git.lucas.co / cce-gallery
widget gallery and compositor test bench

commit82528768818a7fcb4765f0e6b524ccfa4672f3de
parentf6c9bbed73
authorLucas Galante <lsgalante12@gmail.com>
date2026-10-08 13:54
refactor(gallery): the Layout exhibit takes ContainerLayout

LayoutStrategy is gone from cce-ui; the container layouts are a trait of their
own (layout, measure), which is all the exhibit called. Pixel-identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

 src/main.rs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/main.rs b/src/main.rs
index d51a281..ba20162 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1939,14 +1939,14 @@ fn spawn_editor(kind: &str) {
 /// The strategies at the toolkit's own spacing (`layout::control_gap()`, every strategy's
 /// default gap), no padding — the exhibit viewport is already inset — so the page shows
 /// the rhythm a container gets by default.
-const LAYOUTS: [(&str, fn() -> Box<dyn cce_ui::layout::LayoutStrategy>); 7] = [
+const LAYOUTS: [(&str, fn() -> Box<dyn cce_ui::widget::ContainerLayout>); 7] = [
     ("Vertical", || Box::new(VerticalLayout::default())),
     ("Columns", || Box::new(ColumnsLayout { padding_x: 0.0, padding_y: 0.0, ..ColumnsLayout::default() })),
-    ("Grid", || Box::new(GridLayout { columns: 3, gap: cce_ui::layout::control_gap(), padding_x: 0.0, padding_y: 0.0, grid: None })),
-    ("Adaptive Grid", || Box::new(AdaptiveGridLayout { min_col_width: 190.0, gap: cce_ui::layout::control_gap(), padding_x: 0.0, padding_y: 0.0, grid: None })),
+    ("Grid", || Box::new(GridLayout { columns: 3, gap: cce_ui::layout::control_gap(), padding_x: 0.0, padding_y: 0.0 })),
+    ("Adaptive Grid", || Box::new(AdaptiveGridLayout { min_col_width: 190.0, gap: cce_ui::layout::control_gap(), padding_x: 0.0, padding_y: 0.0 })),
     ("Mosaic", || Box::new(MosaicLayout { padding_x: 0.0, padding_y: 0.0, ..MosaicLayout::default() })),
     ("Reverse Mosaic", || Box::new(ReverseMosaicLayout { padding_x: 0.0, padding_y: 0.0, ..ReverseMosaicLayout::default() })),
-    ("Overlay", || Box::new(OverlayLayout::default())),
+    ("Overlay", || Box::new(OverlayLayout)),
 ];
 const DEFAULT_LAYOUT: usize = 4;