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

Fix vertical Slider regression(?) #3484

Closed
wants to merge 1 commit into from

Conversation

hinto-janai
Copy link
Contributor

Regression(?)

In egui 0.23.0, this commit and line exactly, the behavior of vertical Slider's has been swapped.

I'm not sure if this was intentional (nothing in the CHANGELOG.md).

The base used to be the bottom, but it is now the top.

This PR reverts the code calculating the start position and uses .into() to convert to the new Rangef.

egui 0.23.0 Behavior

Horizontal sliders increment left <-> right, vertical sliders increment top <-> bottom:

 0 <-------> 100

       0
       ^
       |
       v
      100

trailing_fill behavior is incorrect here.

current.mp4

Fixed(?) Behavior

Horizontal sliders increment left <-> right (same), vertical sliders increment bottom <-> top (old behavior):

 0 <-------> 100

      100
       ^
       |
       v
       0
fix.mp4

@YgorSouza
Copy link
Contributor

There is already an issue and PR for this #3422 #3424.

@hinto-janai
Copy link
Contributor Author

Ah, I didn't see #3424, it's definitely a better fix - I'll leave this PR up for visibility until 3424 is merged.

@emilk
Copy link
Owner

emilk commented Nov 10, 2023

@emilk emilk closed this Nov 10, 2023
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

Successfully merging this pull request may close these issues.

3 participants