git.lucas.co / cce-layout-interface
page layout tool
git clone https://git.lucas.co/cce-layout-interface.git

commitb0d5ceaf77c5c543d7a9a72ecfc544871e44a875
parent26589c7400
authorLucas Galante <[email protected]>
date2026-07-08 10:04
refactor: adapt Button fields to the cce-ui Phase 5 migration

Button::new now returns Adapted<Button>; concrete-typed fields become
Adapted<Button>. Construction sites, builder chains, and method calls
are unchanged (Deref + Element forwards + mirrored builders).

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LkfJazPs9bRchkcozmxXCX

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

diff --git a/src/main.rs b/src/main.rs
index b63b710..09ace76 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -270,16 +270,16 @@ const PRESETS: &[PagePreset] = &[
 ];
 
 struct LayoutApp {
-    btn_new_doc: Button,
-    btn_open: Button,
+    btn_new_doc: cce_ui::widget::Adapted<cce_ui::widget::Button>,
+    btn_open: cce_ui::widget::Adapted<cce_ui::widget::Button>,
     recent_files: Vec<std::path::PathBuf>,
     recent_files_list: List,
-    recent_files_buttons: Vec<Button>,
-    btn_exit: Button,
-    btn_save: Button,
-    btn_save_as: Button,
+    recent_files_buttons: Vec<cce_ui::widget::Adapted<cce_ui::widget::Button>>,
+    btn_exit: cce_ui::widget::Adapted<cce_ui::widget::Button>,
+    btn_save: cce_ui::widget::Adapted<cce_ui::widget::Button>,
+    btn_save_as: cce_ui::widget::Adapted<cce_ui::widget::Button>,
     paginator: Paginator,
-    layer_buttons: Vec<Box<Button>>,
+    layer_buttons: Vec<Box<cce_ui::widget::Adapted<cce_ui::widget::Button>>>,
     elements: Vec<Element>,
     selected_idx: Option<usize>,
     dragging: Option<(usize, f32, f32)>, // Index, offset_x, offset_y
@@ -340,10 +340,10 @@ struct LayoutApp {
     margin_color: [f32; 4],
     spinbox_margin_thickness: Spinbox,
     margin_thickness: f32,
-    btn_add_text: Button,
-    btn_add_rect: Button,
-    btn_add_banner: Button,
-    btn_add_vector: Button,
+    btn_add_text: cce_ui::widget::Adapted<cce_ui::widget::Button>,
+    btn_add_rect: cce_ui::widget::Adapted<cce_ui::widget::Button>,
+    btn_add_banner: cce_ui::widget::Adapted<cce_ui::widget::Button>,
+    btn_add_vector: cce_ui::widget::Adapted<cce_ui::widget::Button>,
 
     toggle_rulers: cce_ui::widget::Adapted<Toggle>,
     dropdown_units: Dropdown,