Skip to content

Fix switch widget toggle animation being window refresh rate dependent#1145

Merged
ForLoveOfCats merged 1 commit intolinebender:masterfrom
ForLoveOfCats:SwitchAnimUseInterval
Aug 20, 2020
Merged

Fix switch widget toggle animation being window refresh rate dependent#1145
ForLoveOfCats merged 1 commit intolinebender:masterfrom
ForLoveOfCats:SwitchAnimUseInterval

Conversation

@ForLoveOfCats
Copy link
Collaborator

The time in seconds that the animation should take is specified by the SWITCH_CHANGE_TIME constant. I was going to put it in the env but it didn't make sense as currently it is entirely dedicated to theming so I went with a const. The total animation time might appear faster or slower than before, it used to be painfully slow when the refresh rate was 60 hertz and I don't know what refresh rate it was originally tested under so I just tried to go for a value which felt good but wasn't to fast.

The knob position is now also clamped.

@ForLoveOfCats ForLoveOfCats added bug does not behave the way it is supposed to widget concerns a particular widget S-needs-review waits for review labels Aug 20, 2020
@ForLoveOfCats ForLoveOfCats force-pushed the SwitchAnimUseInterval branch from f405d3c to 36e8baf Compare August 20, 2020 22:37
Copy link
Contributor

@raphlinus raphlinus 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 the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug does not behave the way it is supposed to widget concerns a particular widget

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants