Skip to content

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

Merged
emilk merged 2 commits into
emilk:mainfrom
0x53A:fix-slider-keyboard-move-max-decimals
Jun 29, 2025
Merged

emilk merged 2 commits into
emilk:mainfrom
0x53A:fix-slider-keyboard-move-max-decimals

Conversation

@0x53A

@0x53A 0x53A commented May 21, 2025

Copy link
Copy Markdown
Contributor

fixes #7065

@github-actions

Copy link
Copy Markdown

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.

@emilk emilk left a comment

Copy link
Copy Markdown
Owner

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

0x53A commented Jun 26, 2025

Copy link
Copy Markdown
Contributor Author

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

@emilk emilk left a comment

Copy link
Copy Markdown
Owner

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
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