-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[macOS] Ugly drawing of slider's ticks #24532
Comments
Thanks, let's indeed fix this but I don't know what are the currently recommended values, @csomor would you know this by chance? If we change this to 29 we should probably use the other branch to use 25? P.S. I've edited the description to use proper code block (triple single quotes). |
Actually the 28 is correct for the slider, but the labels calculation lead to a height of 49 when shown, this number leads to the ugly rendering. When neither min max nor value are shown, then IMHO things look fine with 28, so the real fix would be there I think. But unfortunately at the moment I don't have time for it ... |
Hi,
When the min and max value are not shown but only the value the drawing of the slider’s ticks is as ugly as with the min and max values (I use the widgets sample, see screenshot attached).

Nevertheless, we should change the slider's implementation. Instead of changing one of the constants we can also make sure that the overall height is always an even number.
… Am 15.05.2024 um 06:43 schrieb Stefan Csomor ***@***.***>:
Actually the 28 is correct for the slider, but the labels calculation lead to a height of 49 when shown, this number leads to the ugly rendering. When neither min max nor value are shown, then IMHO things look fine with 28
—
Reply to this email directly, view it on GitHub <#24532 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAD6V3HQ4NXRIZWIERAGPR3ZCLRX3AVCNFSM6AAAAABHW4ZQFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJRGU3TCOJVGI>.
You are receiving this because you authored the thread.
|
yes, that's correct, as I wrote when no values and no min max labels are shown, then 28 is correct
this would be best IMHO |
… slider's line To have a proper centering with respect to the slider's line, the size of the slider in the dimension perpendicular to the slider's line has to be an even number. Therefore,when determining the best size, the size is adjusted to an even number when ticks are shown.
… are synchronized
To have a proper centering with respect to the slider's line, the size of the slider in the dimension perpendicular to the slider's line has to be an even number. Therefore,when determining the best size, the size is adjusted to an even number when ticks are shown. See wxWidgets#24532, wxWidgets#24537. (cherry picked from commit a4a334e)
Description
Compile widgets sample with default compiler options and select the native slider in the tree book. When the ticks are shown it can be seen that the first half of the ticks is slightly centered above the slider's line, the other half is slight centered below the slider's line (see attached screenshot).
The reason for this behavior is the result line 22 in slider_osx.cpp:
Whenever the defined preprocessor variable has an even value, the slider's ticks are badly centered, choosing an odd value solves the issue. So, 29 is a good value.
BTW: Aqua is pretty much outdated.
The text was updated successfully, but these errors were encountered: