Commit graph

12 commits

Author SHA1 Message Date
Ian Douglas Scott
d4ddae7799 Fix "never read" lint 2025-04-15 14:17:23 -07:00
Ian Douglas Scott
7ab1f93acf Add and use TwoRowColToplevelLayout
This tries to find a split point in the list of toplevels to maximize
the scale factor when calling `RowColToplevelLayout` twice. If it
doesn't get a better scale factor, it just uses a single row/column.

Some things don't seem quite right, but the existing layout is not
perfect, and this can help.

Without the added cross axis spacing, there's overlap, so there may be
something wrong with the requested sizes...
2025-04-08 16:25:16 -07:00
Ian Douglas Scott
1fd7a86ecc row_col_toplevel_layout: Add a new method 2025-04-08 16:25:16 -07:00
Ian Douglas Scott
5349f0f3d0 row_col_toplevel_layout: Take into account max cross axis in scale factor
Previous definition assumed the cross axis of a single window would not
need more downscaling than the total main axis of all children. But that
doesn't always work out.
2025-04-08 16:25:16 -07:00
Ian Douglas Scott
874245bc2e Use aliasable in AxisToplevelLayout to use slice in argument
This makes layouts possible to compose without clones.
2025-03-24 14:59:25 -07:00
Ian Douglas Scott
52bbc6c083 Fix warnings and remove dbg! 2025-02-10 12:04:20 -08:00
Ian Douglas Scott
b5d2eed726 toplevel_layout: Add AxisToplevelLayout helper 2025-02-06 15:09:57 -08:00
Ian Douglas Scott
1342e37ad6 toplevel_layout: Make size depend on axis 2025-02-06 13:45:34 -08:00
Ian Douglas Scott
eb69aba7b2 toplevel_layout: Move logic into a requested_main_total method 2025-02-06 13:40:45 -08:00
Ian Douglas Scott
e032b0b5ee Center toplevels if they don't fill space 2025-01-22 13:42:04 -08:00
Ian Douglas Scott
392adda651 Run cargo clippy --fix 2025-01-15 11:53:59 -08:00
Ian Douglas Scott
faa4a51fb9 Toplevel layout abstraction 2025-01-13 13:13:53 -08:00