-
Notifications
You must be signed in to change notification settings - Fork 24
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
Simplify SegmentedSwitch
implementation
#576
Conversation
bea62a4
to
0470c04
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
SegmentedSwitch
implementationSegmentedSwitch
implementation
0470c04
to
275ce65
Compare
@PavelHolec updated everything, including the button background highlight - I just used what looked right to me, so this will probably need to be tweaked. I think we'll want to use the same thing for |
080dcda
to
0427080
Compare
@PavelHolec please recheck - probably the whole thing. Buttons are now responsible for drawing the selected segment, so the custom style can shrink the backgournd kind of like the official component. I tried to update the fade/highlight on the unselected segments, but of course we're limited here by the fact that the buttons don't actually contain the content, but are drawn under them, so no fade of the titles and no shrinking of the titles, either. Still, I think this is now pretty damn good, considering how much time (way more than I'd like) I spent on it. See video for what the interactions look like now. Ideal size is also supported. Screen.Recording.2023-05-30.at.0.20.59.mov |
No changes in functionality, just code simplification. No more custom builder, so there is no longer a two-view limit, but everything else should stay the same - and it seems this will work with a
ForEach
as well, so this is a good preparation forTabs
.Closes #575.