brndnmtthws / conky

Light-weight system monitor for X, Wayland (sort of), and other things, too
https://conky.cc
GNU General Public License v3.0
7.31k stars 620 forks source link

[Bug]: Wrong hr line thickness #1930

Closed istenburg closed 5 months ago

istenburg commented 6 months ago

What happened?

After updating to version 1.21.1-1, the display becomes very bold... Bildschirmfoto_2024-05-22_13-45-48 Bildschirmfoto_2024-05-22_13-48-58

Version

1.21.1-1

Which OS/distro are you seeing the problem on?

Arch Linux

Conky config

No response

Stack trace

No response

Relevant log output

No response

Caellian commented 6 months ago

Can you let me know what value gets returned by xrdb -query | grep dpi?

istenburg commented 6 months ago

No value is displayed at all

Caellian commented 6 months ago

Bug likely introduced by #1926, #1877 (or even #1841).

I compared DPI scaling functions from before and after that change and they produce different results. The change was made to make the function work with non-int types as well. I tried mimicking the old code, but it produces bad results:

DPI: 20   - ORIGINAL: 0; NEW: 1
DPI: 21   - ORIGINAL: 0; NEW: 1
DPI: 22   - ORIGINAL: 0; NEW: 1
DPI: 23   - ORIGINAL: 0; NEW: 1
DPI: 24   - ORIGINAL: 0; NEW: 1
DPI: 25   - ORIGINAL: 0; NEW: 1
DPI: 26   - ORIGINAL: 0; NEW: 1
DPI: 27   - ORIGINAL: 0; NEW: 1
DPI: 28   - ORIGINAL: 0; NEW: 1
DPI: 29   - ORIGINAL: 0; NEW: 1
DPI: 30   - ORIGINAL: 0; NEW: 1
DPI: 31   - ORIGINAL: 0; NEW: 1
DPI: 32   - ORIGINAL: 0; NEW: 1
DPI: 33   - ORIGINAL: 0; NEW: 1
DPI: 34   - ORIGINAL: 0; NEW: 1
DPI: 35   - ORIGINAL: 0; NEW: 1
DPI: 36   - ORIGINAL: 0; NEW: 1
DPI: 37   - ORIGINAL: 0; NEW: 1
DPI: 38   - ORIGINAL: 0; NEW: 1
DPI: 39   - ORIGINAL: 0; NEW: 1
DPI: 40   - ORIGINAL: 0; NEW: 1
DPI: 41   - ORIGINAL: 0; NEW: 1
DPI: 42   - ORIGINAL: 0; NEW: 1
DPI: 43   - ORIGINAL: 0; NEW: 1
DPI: 44   - ORIGINAL: 0; NEW: 1
DPI: 45   - ORIGINAL: 0; NEW: 1
DPI: 46   - ORIGINAL: 0; NEW: 1
DPI: 47   - ORIGINAL: 0; NEW: 1
DPI: 48   - OK
DPI: 49   - OK
DPI: 50   - OK
DPI: 51   - OK
DPI: 52   - OK
DPI: 53   - OK
DPI: 54   - OK
DPI: 55   - OK
DPI: 56   - OK
DPI: 57   - OK
DPI: 58   - OK
DPI: 59   - OK
DPI: 60   - OK
DPI: 61   - OK
DPI: 62   - OK
DPI: 63   - OK
DPI: 64   - OK
DPI: 65   - OK
DPI: 66   - OK
DPI: 67   - OK
DPI: 68   - OK
DPI: 69   - OK
DPI: 70   - OK
DPI: 71   - OK
DPI: 72   - OK
DPI: 73   - OK
DPI: 74   - OK
DPI: 75   - OK
DPI: 76   - OK
DPI: 77   - OK
DPI: 78   - OK
DPI: 79   - OK
DPI: 80   - OK
DPI: 81   - OK
DPI: 82   - OK
DPI: 83   - OK
DPI: 84   - OK
DPI: 85   - OK
DPI: 86   - OK
DPI: 87   - OK
DPI: 88   - OK
DPI: 89   - OK
DPI: 90   - OK
DPI: 91   - OK
DPI: 92   - OK
DPI: 93   - OK
DPI: 94   - OK
DPI: 95   - OK
DPI: 96   - OK
DPI: 97   - ORIGINAL: 1; NEW: 2
DPI: 98   - ORIGINAL: 1; NEW: 2
DPI: 99   - ORIGINAL: 1; NEW: 2
DPI: 100  - ORIGINAL: 1; NEW: 2
DPI: 101  - ORIGINAL: 1; NEW: 2
DPI: 102  - ORIGINAL: 1; NEW: 2
DPI: 103  - ORIGINAL: 1; NEW: 2
DPI: 104  - ORIGINAL: 1; NEW: 2
DPI: 105  - ORIGINAL: 1; NEW: 2
DPI: 106  - ORIGINAL: 1; NEW: 2
DPI: 107  - ORIGINAL: 1; NEW: 2
DPI: 108  - ORIGINAL: 1; NEW: 2
DPI: 109  - ORIGINAL: 1; NEW: 2
DPI: 110  - ORIGINAL: 1; NEW: 2
DPI: 111  - ORIGINAL: 1; NEW: 2
DPI: 112  - ORIGINAL: 1; NEW: 2
DPI: 113  - ORIGINAL: 1; NEW: 2
DPI: 114  - ORIGINAL: 1; NEW: 2
DPI: 115  - ORIGINAL: 1; NEW: 2
DPI: 116  - ORIGINAL: 1; NEW: 2
DPI: 117  - ORIGINAL: 1; NEW: 2
DPI: 118  - ORIGINAL: 1; NEW: 2
DPI: 119  - ORIGINAL: 1; NEW: 2
DPI: 120  - ORIGINAL: 1; NEW: 2
DPI: 121  - ORIGINAL: 1; NEW: 2
DPI: 122  - ORIGINAL: 1; NEW: 2
DPI: 123  - ORIGINAL: 1; NEW: 2
DPI: 124  - ORIGINAL: 1; NEW: 2
DPI: 125  - ORIGINAL: 1; NEW: 2
DPI: 126  - ORIGINAL: 1; NEW: 2
DPI: 127  - ORIGINAL: 1; NEW: 2
DPI: 128  - ORIGINAL: 1; NEW: 2
DPI: 129  - ORIGINAL: 1; NEW: 2
DPI: 130  - ORIGINAL: 1; NEW: 2
DPI: 131  - ORIGINAL: 1; NEW: 2
DPI: 132  - ORIGINAL: 1; NEW: 2
DPI: 133  - ORIGINAL: 1; NEW: 2
DPI: 134  - ORIGINAL: 1; NEW: 2
DPI: 135  - ORIGINAL: 1; NEW: 2
DPI: 136  - ORIGINAL: 1; NEW: 2
DPI: 137  - ORIGINAL: 1; NEW: 2
DPI: 138  - ORIGINAL: 1; NEW: 2
DPI: 139  - ORIGINAL: 1; NEW: 2
DPI: 140  - ORIGINAL: 1; NEW: 2
DPI: 141  - ORIGINAL: 1; NEW: 2
DPI: 142  - ORIGINAL: 1; NEW: 2
DPI: 143  - ORIGINAL: 1; NEW: 2
DPI: 144  - OK
DPI: 145  - OK
DPI: 146  - OK
DPI: 147  - OK
DPI: 148  - OK
DPI: 149  - OK
DPI: 150  - OK
DPI: 151  - OK
DPI: 152  - OK
DPI: 153  - OK
DPI: 154  - OK
DPI: 155  - OK
DPI: 156  - OK
DPI: 157  - OK
DPI: 158  - OK
DPI: 159  - OK
DPI: 160  - OK
DPI: 161  - OK
DPI: 162  - OK
DPI: 163  - OK
DPI: 164  - OK
DPI: 165  - OK
DPI: 166  - OK
DPI: 167  - OK
DPI: 168  - OK
DPI: 169  - OK
DPI: 170  - OK
DPI: 171  - OK
DPI: 172  - OK
DPI: 173  - OK
DPI: 174  - OK
DPI: 175  - OK
DPI: 176  - OK
DPI: 177  - OK
DPI: 178  - OK
DPI: 179  - OK
DPI: 180  - OK
DPI: 181  - OK
DPI: 182  - OK
DPI: 183  - OK
DPI: 184  - OK
DPI: 185  - OK
DPI: 186  - OK
DPI: 187  - OK
DPI: 188  - OK
DPI: 189  - OK
DPI: 190  - OK
DPI: 191  - OK
DPI: 192  - OK
DPI: 193  - ORIGINAL: 2; NEW: 3
DPI: 194  - ORIGINAL: 2; NEW: 3
DPI: 195  - ORIGINAL: 2; NEW: 3
DPI: 196  - ORIGINAL: 2; NEW: 3
DPI: 197  - ORIGINAL: 2; NEW: 3
DPI: 198  - ORIGINAL: 2; NEW: 3
DPI: 199  - ORIGINAL: 2; NEW: 3
DPI: 200  - ORIGINAL: 2; NEW: 3

Fix seems to be replacing weird rounding function I garbled up with std::round as those values do match.

This bug isn't related to #1931 but it was introduced in the same set of changes.

Caellian commented 6 months ago

Can you try fix/inconsistent-scaling branch and let me know whether this is fixed?

git clone -b fix/inconsistent-scaling git@github.com:brndnmtthws/conky.git test_conky
cmake -S test_conky -B test_conky/build
cmake --build test_conky/build

# run with
./test_conky/build/src/conky <options>
Caellian commented 6 months ago

Branch has been merged into main, let me know whether the issue is fixed when you have time and I'll close this issue.

gc-user commented 5 months ago

v1.21.2 fixes this "lines too thick" issue from v1.21.1 for me. Thanks for the fix!