Skip to content

Slider: move by at least the next increment when using fixed_decimals #7066

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

Merged
merged 2 commits into from
Jun 29, 2025

Conversation

0x53A
Copy link
Contributor

@0x53A 0x53A commented May 21, 2025

fixes #7065

Copy link

Preview available at https://egui-pr-preview.github.io/pr/7066-fix-slider-keyboard-move-max-decimals
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

Copy link
Owner

@emilk emilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense! Can you please add a test for this though (using egui_kittest)? I don't think you need a screenshot test, but it would be nice with a test that sets up a value, then injects a arrow key, and then reads back the value to see that it changed by the expected amount.

@emilk emilk added bug Something is broken egui labels Jun 24, 2025
@0x53A 0x53A force-pushed the fix-slider-keyboard-move-max-decimals branch from 7ae7046 to 24e0799 Compare June 26, 2025 03:14
@0x53A 0x53A requested a review from lucasmerlin as a code owner June 26, 2025 03:14
@0x53A
Copy link
Contributor Author

0x53A commented Jun 26, 2025

i've manually checked that the test fails on main and succeeds on the branch

@0x53A 0x53A force-pushed the fix-slider-keyboard-move-max-decimals branch from 24e0799 to 33e6fde Compare June 26, 2025 03:20
Copy link
Owner

@emilk emilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding that test!

@emilk emilk merged commit c943720 into emilk:main Jun 29, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken egui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

arrow navigation (sometimes) doesn't work on a slider when using .fixed_decimals(n)
2 participants