git.lucas.co / cce-system-interface
system settings
git clone https://git.lucas.co/cce-system-interface.git

commit44bd033498a6b48d2f2f9227177cf2dc5b1c523f
parent207fc6bab8
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/app.rs               |  2 +-
 src/main.rs              |  2 +-
 src/pages/system_info.rs | 10 +++++-----
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/app.rs b/src/app.rs
index 4884edc..104df59 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -97,7 +97,7 @@ pub enum AppAction {
 pub struct PageContent {
     pub rects: Vec<([f32; 4], f32, f32, f32, f32, f32, (bool, bool, bool, bool))>,
     pub texts: Vec<(String, f32, f32, f32, [f32; 4], Option<String>, Option<[f32; 4]>)>,
-    pub buttons: Vec<(cce_ui::widget::Button, AppAction)>,
+    pub buttons: Vec<(cce_ui::widget::Adapted<cce_ui::widget::Button>, AppAction)>,
     pub clip_stack: Vec<[f32; 4]>,
     pub measure_only: bool,
 }
diff --git a/src/main.rs b/src/main.rs
index 907b52b..3ceadbc 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -35,7 +35,7 @@ struct SystemInterface {
     font_system: FontSystem,
     widgets: Vec<AppWidget>,
     text_items: Vec<cce_ui::widget::TextItem>,
-    page_buttons: Vec<(cce_ui::widget::Button, AppAction)>,
+    page_buttons: Vec<(cce_ui::widget::Adapted<cce_ui::widget::Button>, AppAction)>,
 
     sidebar_width: f32,
     header_height: f32,
diff --git a/src/pages/system_info.rs b/src/pages/system_info.rs
index 924f5fc..92f2250 100644
--- a/src/pages/system_info.rs
+++ b/src/pages/system_info.rs
@@ -62,11 +62,11 @@ pub struct SystemState {
     pub cpu_info_box: InfoBox,
     pub gpu_info_box: InfoBox,
 
-    pub suspend_btn: Button,
-    pub hibernate_btn: Button,
-    pub reboot_btn: Button,
-    pub poweroff_btn: Button,
-    pub force_shutdown_btn: Button,
+    pub suspend_btn: cce_ui::widget::Adapted<cce_ui::widget::Button>,
+    pub hibernate_btn: cce_ui::widget::Adapted<cce_ui::widget::Button>,
+    pub reboot_btn: cce_ui::widget::Adapted<cce_ui::widget::Button>,
+    pub poweroff_btn: cce_ui::widget::Adapted<cce_ui::widget::Button>,
+    pub force_shutdown_btn: cce_ui::widget::Adapted<cce_ui::widget::Button>,
 
     pub sec_system: SectionContainer,
     pub sec_actions: SectionContainer,