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] Wrong calculation of slider's vertical label positions (in case of a horizontal slider) #24535

Open
hwiesmann opened this issue May 15, 2024 · 0 comments

Comments

@hwiesmann
Copy link
Contributor

The slider's label positions are wrongly calculated:

  1. the distance between the slider's knob and the label is insufficient as the text overlaps with the knob when the slider has its best size
  2. the label vertical positions in case of a horizontal slider (same holds for a vertical slider) are not adjusted when the slider's vertical size is below its best size

The effects can be seen by using the image sample program and opening the "Image filters test" window. I have attached two screen shots showing the two shortcomings.

Remark: the slider's background has been set by myself to red (I just did some investigations of the root cause and therefore needed a visual feedback) and is not part of the original source code.

Bildschirmfoto 2024-05-15 um 23 56 52

This screenshot has been made when the window had been sufficiently enlarged.

Bildschirmfoto 2024-05-15 um 23 57 08

This screenshot has been made when the height of the window had been reduced.

The reasons for the shortcomings are:

  • wrong calculation of the distance between the slider's knob and the labels' texts
  • not taking the size of the slider into account
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant