Skip to content
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] Alignment of a slider's current value looks strange #24531

Open
hwiesmann opened this issue May 14, 2024 · 1 comment
Open

[macOS] Alignment of a slider's current value looks strange #24531

hwiesmann opened this issue May 14, 2024 · 1 comment
Labels

Comments

@hwiesmann
Copy link
Contributor

Description

I have set the minimum value of the slider to -100 in the widgets sample (see screenshot attached).
Bildschirmfoto 2024-05-14 um 22 33 54

The current value is zero. Nevertheless, the label is positioned to the left of the slider's knob. This looks strange. I do not know how it looks like in other OSes but I prefer a center alignment.
Any objections or should I prepare a fix?

PS: Because of the odd ticks frequency it looks like the slider is not positioned at zero but this is actually the case.

@vadz
Copy link
Contributor

vadz commented May 15, 2024

Yes, this definitely looks wrong, TIA for fixing this!

hwiesmann pushed a commit to hwiesmann/wxWidgets that referenced this issue May 27, 2024
Value label is now always centered (wxWidgets#24531) with respect to the slider's moving direction.
The labels are adjusted with respect to their position perpendicular to the slider's moving direction in case the slider's across size is smaller than its best size.
hwiesmann pushed a commit to hwiesmann/wxWidgets that referenced this issue May 27, 2024
Value label is now always centered (wxWidgets#24531) with respect to the slider's moving direction.
The labels are adjusted with respect to their position perpendicular to the slider's moving direction in case the slider's across size is smaller than its best size (wxWidgets#24535).
hwiesmann pushed a commit to hwiesmann/wxWidgets that referenced this issue May 28, 2024
Initial commit modified:
 - constexpr instead of const
 - removal of iostream
 - wxMax instead of MAX
 - HasFlag() instead of style & ...

I have still kept all modifications in one commit because the old source code is mostly a copy & paste of old Carbon code that does not make much sense for Cocoa (it worked but that's it). All these modifications are necessary to bring the code from Carbon to Cocoa.
Some further modifications can be done to clean up the code further. But this commit lets actually the sliders look like sliders on Cocoa.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants