Skip to content

Fill the side-by-side plane and give each screenshot its own color - #360

Merged
smelfungus merged 4 commits into
masterfrom
side-by-side-plane
Sep 27, 2026
Merged

smelfungus merged 4 commits into
masterfrom
side-by-side-plane

Conversation

@smelfungus

Copy link
Copy Markdown
Member

Fixes found using the 2.0 sample on desktop, and a pass over the README's images. Builds on #359.

  • The plane is as tall as the sliders beside it. Laid out side by side, as the dialog is on a wide, short window, the plane kept the stacked picker's 1.6 proportion: in the dialog a 160 dp strip at the top of its half beside 290 dp of sliders, with an empty band under it. The sliders are measured first and the plane takes their height as its least, so the two columns start and end together; in the dialog the plane comes out close to square. A plane slot that asks for more height still gets it, and stacked pickers render exactly as before.
  • The mouse wheel scrolls past a disabled picker. A disabled picker consumed every pointer event under it, the wheel's too, so a page stopped scrolling while the cursor was over one. It still refuses presses and drags.
  • The portrait dialog screenshot has a phone's margins, and the README and the docs page show it 360 px wide rather than across the whole column.
  • Every screenshot has a color of its own, one of Pantone's Colors of the Year, where all 30 used to start from the same green. A picker's independent and contextual renders share one, so the pair still differs only in coloring mode. The sample's two pickers and the README's plane example take palette colors too.

A slider pressed with the mouse still moves on release or once the drag starts, as Compose's Material 3 Slider does.

The two side-by-side references change with the layout, the portrait dialog's with its margins, and every reference with the palette.

Laid out side by side, as the dialog is on a wide, short window, the plane kept the 1.6 proportion of the stacked picker: in the dialog a 160 dp strip at the top of its half, beside 290 dp of sliders, with an empty band under it. The sliders are now measured first and the plane is given their height as its least, so the two columns start and end together; in the dialog the plane comes out close to square. A plane slot that asks for more height still gets it.

The default plane sized itself with aspectRatio, which keeps its proportion against a least height rather than filling it, so it now takes a least height when one is given and the 1.6 proportion otherwise. Stacked pickers are unchanged, and their screenshots with them.
A disabled picker refused pointer input by consuming every event under it, the wheel's too, so a page holding a disabled picker stopped scrolling whenever the cursor was over it. It still refuses presses and drags, and leaves the wheel to whatever scrolls.
The preview's dialog window runs edge to edge, so the screenshot showed the dialog touching both sides of the screen, and GitHub drew the portrait image across the whole README column. The preview insets the dialog 24 dp a side, as a phone's dialog window does, and the README and the docs page show it 360 px wide.
Every screenshot started from the same pear green, so the README's gallery read as one image repeated and a picker could not be told from its neighbour at a glance. Each case now starts from its own Pantone Color of the Year, as the sRGB values commonly published for them; a picker's independent and contextual renders share one, so the pair still differs only in coloring mode. The sample's two pickers take two more, and the plane example in the README the color of the plane beside it.

The palette colors are sRGB, so the dialog screenshots pass initialSpace = Okhsl rather than opening on the RGB tab, which has no plane.
@smelfungus
smelfungus merged commit 0e1b19e into master Sep 27, 2026
2 checks passed
@smelfungus
smelfungus deleted the side-by-side-plane branch September 27, 2026 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant