[JEWEL-1061] Fix split button chevron getting squashed - #3283
Sebastiano Poggi (rock3r) wants to merge 1 commit into
Conversation
|
(I'll rebase to get the Metalava fixes when I get the second review) |
99556ed to
922205c
Compare
|
Ready to merge |
922205c to
06ec379
Compare
This fixes an issue with the secondary content (the chevron) getting squashed in split buttons, when there isn't enough space to show both the primary and secondary contents fully. As a bonus, this also fixes: * The divider height is no longer capped, but scales correctly with the button's height * Colours were all sorts of wrong in standalone mode for buttons, especially in the disabled state (they are fine in bridge mode) * The semantics role of the secondary action is now the same as in Swing (button) * The modifier passed to split buttons is now applied in the right place, and the internal layout is simplified The buttons showcase is also improved, now showing a space- constrained split button that did not use to work correctly, and putting all the content in flow rows so it scales better as the window is resized. The visual appearance is also tweaked to better represent the information hierarchy.
| } | ||
| ) { | ||
| content() | ||
| } |
There was a problem hiding this comment.
Bug: Row height doesn't scale when button height increases
The Row inside ButtonImpl has an explicit .height(style.metrics.minSize.height) constraint but lacks fillMaxHeight(). When a button's height is increased via modifier (e.g., Modifier.height(80.dp)), the Row remains at the minimum height instead of scaling to fill the available space. This causes the chevron and divider to not scale with the button height, causing the "chevron and divider scale beyond the minimum button height" test to fail. The Row should include fillMaxHeight() to properly expand when the button becomes taller.
Additional Locations (1)
06ec379 to
bf3539a
Compare
|
Spotted some issues I'll have to fix after the last rebase :(((( |
|
Nevermind, it actually works fine. Go figure |
This fixes an issue with the secondary content (the chevron) getting squashed in split buttons, when there isn't enough space to show both the primary and secondary contents fully. As a bonus, this also fixes: * The divider height is no longer capped, but scales correctly with the button's height * Colours were all sorts of wrong in standalone mode for buttons, especially in the disabled state (they are fine in bridge mode) * The semantics role of the secondary action is now the same as in Swing (button) * The modifier passed to split buttons is now applied in the right place, and the internal layout is simplified The buttons showcase is also improved, now showing a space- constrained split button that did not use to work correctly, and putting all the content in flow rows so it scales better as the window is resized. The visual appearance is also tweaked to better represent the information hierarchy. closes #3283 (cherry picked from commit d642d70d7b31397d92b78e5c8fc044f8e4bcaad5) (cherry picked from commit 642538ee94b8ec34ee38d0d2db45133a2be16557) IJ-MR-185912 GitOrigin-RevId: 4d2e22d9d94dbcff4127d737d60e2d14944edf5a
This fixes an issue with the secondary content (the chevron) getting squashed in split buttons, when there isn't enough space to show both the primary and secondary contents fully.
As a bonus, this also fixes:
The buttons showcase is also improved, now showing a space-constrained split button that did not use to work correctly, and putting all the content in flow rows so it scales better as the window is resized. The visual appearance is also tweaked to better represent the information hierarchy.
Screen.Recording.2025-10-17.at.19.20.41.mov
Before
After
Release notes
Bug fixes
*SplitButtons where the chevron would get squashed if the button wasn't wide enough to fit both the main and secondary content*SplitButtons where the divider height was limited, and would not grow with the button's height if it gets taller than the minimum height*Buttoncolours in standalone, especially in the disabled state, to realign them with Swing*SplitButtons to be the same as in Swing*SplitButtons being applied to the wrong level, causing all sorts of unexpected behaviour (e.g., if you set a height, the button's visual height would not grow)Note
Fixes split button chevron width and divider scaling, refines standalone button colors (incl. disabled), and updates showcase plus tests.
ButtonColors(light/dark): disabled backgrounds nowColor.Unspecified; adjust disabled content/border shades.SplitButtonStylecolors (light/dark): corrected divider, chevron, and disabled divider colors.FlowRow, add group headers, single-line texts with ellipsis, width/height-constrained split button demos, and blank-notice menu items.Written by Cursor Bugbot for commit bf3539a. This will update automatically on new commits. Configure here.