-
-
Notifications
You must be signed in to change notification settings - Fork 514
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
feat: combined stepped and normal button types #2187
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66fb27d
to
0f4690e
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This needs some UI work, as the nesting of scrollbars causes some weirdness, but the nested tabs are essential to avoid the panel becoming a stupidly long list once there are multiple steps.
This started out as a combination of making rotary actions work on stepped buttons, and giving stepped buttons up actions. I think both of these are important things to support, and will allow for a single encoder to be used as a RGB colour wheel, by pressing to cycle which colour you will adjust, among many other uses.
The further I got into this, I realised that normal buttons behaved exactly like a stepped button with only one step, so why not expose them like that in the ui? This will give users the freedom to convert seamlessly between the types.
The downside is that the ui is feeling more cluttered, and some of it could be rather confusing. Hopefully we can tidy up the ui sufficiently, perhaps hiding some bits in certain scenarios
A 'normal' button now looks like this:

Key differences are that the actions and feedbacks are now in tabs, with a tab used to 'add step'.
Buttons can then be made into stepped buttons as simply as adding a second step.
Each step gets its own down, up, and rotate action sets/groups, as well as long press groups.
The checkbox to 'auto progress step' now causes the step to progress on release. This can of course be disabled and the internal actions to control the current step can be used instead to control the current step.