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

commitced03386c64d11437c956675e3efb8ff664666d2
parent2d66881832
authorLucas Galante <[email protected]>
date2026-07-12 19:33
refactor: Element -> WidgetHost (cce-ui 6bd flip)

Mechanical rename; the god-trait name is gone workspace-wide.

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

 src/input_handler.rs       |  4 ++--
 src/pages/accounts.rs      |  8 ++++----
 src/pages/audio.rs         | 12 ++++++------
 src/pages/fonts.rs         |  6 +++---
 src/pages/mod.rs           |  4 ++--
 src/pages/network.rs       |  4 ++--
 src/pages/notifications.rs |  6 +++---
 src/pages/packages.rs      |  6 +++---
 src/pages/processes.rs     |  6 +++---
 src/pages/storage.rs       |  2 +-
 src/pages/system_info.rs   |  6 +++---
 src/renderer.rs            |  4 ++--
 src/scroll_bar.rs          |  2 +-
 13 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/src/input_handler.rs b/src/input_handler.rs
index c824ff3..817e354 100644
--- a/src/input_handler.rs
+++ b/src/input_handler.rs
@@ -1,7 +1,7 @@
 use crate::SystemInterface;
 use cce_settings::app::AppAction;
 use cce_settings::pages::Page;
-use cce_ui::widget::Element;
+use cce_ui::widget::WidgetHost;
 
 impl SystemInterface {
 
@@ -257,7 +257,7 @@ impl SystemInterface {
     /// the pages' widgets themselves, flattened in the legacy propagate order (sections
     /// last-to-first, and within a section the container children were visited in
     /// reverse link order).
-    pub(crate) fn page_dispatch_roots(&mut self) -> Vec<*mut (dyn cce_ui::widget::Element + 'static)> {
+    pub(crate) fn page_dispatch_roots(&mut self) -> Vec<*mut (dyn cce_ui::widget::WidgetHost + 'static)> {
         self.app
             .get_current_page_mut()
             .section_widgets()
diff --git a/src/pages/accounts.rs b/src/pages/accounts.rs
index 9b81042..08aa4a3 100644
--- a/src/pages/accounts.rs
+++ b/src/pages/accounts.rs
@@ -1,6 +1,6 @@
 use crate::app::{AppAction, PageContent, SectionContextExt};
 use cce_ui::layout::{PageLayoutBuilder, LayoutStrategy};
-use cce_ui::widget::{TextBox, Element};
+use cce_ui::widget::{TextBox, WidgetHost};
 
 #[derive(Debug, Clone, serde::Serialize, serde::Deserialize, PartialEq)]
 pub struct AccountInfo {
@@ -824,9 +824,9 @@ pub fn update(state: &mut AccountsState, msg: AccountsMessage) {
 
 impl crate::pages::AppPage for AccountsState {
     // Sections: [Accounts, Modify Accounts] — the modify group depends on the mode.
-    fn section_widgets(&mut self) -> Vec<Vec<*mut (dyn cce_ui::widget::Element + 'static)>> {
-        use cce_ui::widget::Element;
-        let modify: Vec<*mut (dyn Element + 'static)> = if self.editing_oauth_creds {
+    fn section_widgets(&mut self) -> Vec<Vec<*mut (dyn cce_ui::widget::WidgetHost + 'static)>> {
+        use cce_ui::widget::WidgetHost;
+        let modify: Vec<*mut (dyn WidgetHost + 'static)> = if self.editing_oauth_creds {
             vec![
                 self.oauth_client_id_box.as_ptr_mut(),
                 self.oauth_client_secret_box.as_ptr_mut(),
diff --git a/src/pages/audio.rs b/src/pages/audio.rs
index 4c7fef6..a12a120 100644
--- a/src/pages/audio.rs
+++ b/src/pages/audio.rs
@@ -1,6 +1,6 @@
 use crate::app::{AppAction, PageContent, SectionContextExt};
 use cce_ui::layout::{render_widget, PageLayoutBuilder, LayoutStrategy};
-use cce_ui::widget::{Spinbox, Slider, Element};
+use cce_ui::widget::{Spinbox, Slider, WidgetHost};
 
 #[derive(Debug, Clone)]
 pub struct AudioSink {
@@ -409,9 +409,9 @@ pub fn update(state: &mut AudioState, msg: AudioMessage) {
 impl crate::pages::AppPage for AudioState {
     // Sections: [Output, Input] — only active devices' controls, spinbox before slider
     // per device (the old link order).
-    fn section_widgets(&mut self) -> Vec<Vec<*mut (dyn cce_ui::widget::Element + 'static)>> {
-        use cce_ui::widget::Element;
-        let mut output: Vec<*mut (dyn Element + 'static)> = Vec::new();
+    fn section_widgets(&mut self) -> Vec<Vec<*mut (dyn cce_ui::widget::WidgetHost + 'static)>> {
+        use cce_ui::widget::WidgetHost;
+        let mut output: Vec<*mut (dyn WidgetHost + 'static)> = Vec::new();
         for (i, sink) in self.sinks.iter().enumerate() {
             if sink.active {
                 if let Some(sb) = self.sink_spinboxes.get_mut(i) {
@@ -422,7 +422,7 @@ impl crate::pages::AppPage for AudioState {
                 }
             }
         }
-        let mut input: Vec<*mut (dyn Element + 'static)> = Vec::new();
+        let mut input: Vec<*mut (dyn WidgetHost + 'static)> = Vec::new();
         for (i, src) in self.sources.iter().enumerate() {
             if src.active {
                 if let Some(sb) = self.source_spinboxes.get_mut(i) {
@@ -592,7 +592,7 @@ mod tests {
     #[test]
     #[allow(unused_assignments)]
     fn test_boxed_spinbox_right_click_crash() {
-        use cce_ui::widget::{Element, Spinbox};
+        use cce_ui::widget::{WidgetHost, Spinbox};
         let mut state = AudioState::default();
         state.sink_spinboxes.push(Box::new(Spinbox::new(50, 0, 100, 1)));
         let mut ctx = cce_ui::context::UiContext::new();
diff --git a/src/pages/fonts.rs b/src/pages/fonts.rs
index de53a04..f51effa 100644
--- a/src/pages/fonts.rs
+++ b/src/pages/fonts.rs
@@ -1,6 +1,6 @@
 use std::fs;
 use cce_ui::layout::LayoutStrategy;
-use cce_ui::widget::{TextBox, Dropdown, Spinbox, Element};
+use cce_ui::widget::{TextBox, Dropdown, Spinbox, WidgetHost};
 use crate::app::{PageContent, AppAction};
 use crate::pages::AppPage;
 
@@ -98,8 +98,8 @@ impl Default for FontsState {
 
 impl AppPage for FontsState {
     // Sections: [Preferred Fonts, Borders, Status Interface, Fuzzel, Terminal]
-    fn section_widgets(&mut self) -> Vec<Vec<*mut (dyn cce_ui::widget::Element + 'static)>> {
-        use cce_ui::widget::Element;
+    fn section_widgets(&mut self) -> Vec<Vec<*mut (dyn cce_ui::widget::WidgetHost + 'static)>> {
+        use cce_ui::widget::WidgetHost;
         vec![
             vec![self.sans_box.as_ptr_mut(), self.serif_box.as_ptr_mut(), self.mono_box.as_ptr_mut()],
             vec![self.borders_menu.as_ptr_mut(), self.borders_box.as_ptr_mut()],
diff --git a/src/pages/mod.rs b/src/pages/mod.rs
index 31f8ef1..fd12931 100644
--- a/src/pages/mod.rs
+++ b/src/pages/mod.rs
@@ -64,7 +64,7 @@ pub trait AppPage {
     /// outer length drives the `sec_focused` flags) — holding the widgets that used to
     /// hang under that section's container, in the old link order. The widgets dispatch
     /// directly as propagate roots and the groups drive the app-side ctrl-nav.
-    fn section_widgets(&mut self) -> Vec<Vec<*mut (dyn cce_ui::widget::Element + 'static)>>;
+    fn section_widgets(&mut self) -> Vec<Vec<*mut (dyn cce_ui::widget::WidgetHost + 'static)>>;
 
     fn view(
         &mut self,
@@ -101,7 +101,7 @@ pub trait AppPage {
     /// Extra top-level event-dispatch roots beyond the section containers: the per-row
     /// widgets that used to hang under a `List`'s ScrollBox (dissolved — the rows now
     /// dispatch directly; `Adapted` hit-gates presses/wheel so misses fall through).
-    fn extra_dispatch_roots(&mut self) -> Vec<*mut (dyn cce_ui::widget::Element + 'static)> {
+    fn extra_dispatch_roots(&mut self) -> Vec<*mut (dyn cce_ui::widget::WidgetHost + 'static)> {
         Vec::new()
     }
 
diff --git a/src/pages/network.rs b/src/pages/network.rs
index 164f215..6b3f3c2 100644
--- a/src/pages/network.rs
+++ b/src/pages/network.rs
@@ -1,7 +1,7 @@
 use crate::app::{AppAction, PageContent, SectionContextExt};
 use crate::scroll_region::ScrollRegion;
 use cce_ui::layout::{PageLayoutBuilder, LayoutStrategy, RenderTarget};
-use cce_ui::widget::{Adapted, Toggle, Element};
+use cce_ui::widget::{Adapted, Toggle, WidgetHost};
 
 #[derive(Debug, Clone)]
 pub struct WifiNetwork {
@@ -526,7 +526,7 @@ impl NetworkState {
 
 impl crate::pages::AppPage for NetworkState {
     // Sections: [WiFi, Bluetooth]
-    fn section_widgets(&mut self) -> Vec<Vec<*mut (dyn Element + 'static)>> {
+    fn section_widgets(&mut self) -> Vec<Vec<*mut (dyn WidgetHost + 'static)>> {
         vec![
             vec![self.wifi_toggle.as_ptr_mut()],
             vec![self.bt_toggle.as_ptr_mut()],
diff --git a/src/pages/notifications.rs b/src/pages/notifications.rs
index 3d83dcd..8e8c9a4 100644
--- a/src/pages/notifications.rs
+++ b/src/pages/notifications.rs
@@ -1,7 +1,7 @@
 use std::fs;
 use std::io::Write;
 use cce_ui::widget::input::{Toggle, Dropdown, Spinbox};
-use cce_ui::widget::Element;
+use cce_ui::widget::WidgetHost;
 use cce_ui::layout::{PageLayoutBuilder, LayoutStrategy};
 use crate::app::{AppAction, PageContent, SectionContextExt};
 use crate::pages::AppPage;
@@ -185,8 +185,8 @@ fn get_config_path() -> String {
 
 impl AppPage for NotificationsState {
     // Sections: [Notifications Settings]
-    fn section_widgets(&mut self) -> Vec<Vec<*mut (dyn cce_ui::widget::Element + 'static)>> {
-        use cce_ui::widget::Element;
+    fn section_widgets(&mut self) -> Vec<Vec<*mut (dyn cce_ui::widget::WidgetHost + 'static)>> {
+        use cce_ui::widget::WidgetHost;
         vec![vec![
             self.enable_toggle.as_ptr_mut(),
             self.bell_menu.as_ptr_mut(),
diff --git a/src/pages/packages.rs b/src/pages/packages.rs
index 13c6daa..41cfd22 100644
--- a/src/pages/packages.rs
+++ b/src/pages/packages.rs
@@ -1,7 +1,7 @@
 use crate::app::{AppAction, PageContent, SectionContextExt};
 use crate::scroll_region::ScrollRegion;
 use cce_ui::layout::{render_widget, PageLayoutBuilder, LayoutStrategy, SectionContext, RenderTarget};
-use cce_ui::widget::{Element, TextBox, InteractiveListItem};
+use cce_ui::widget::{WidgetHost, TextBox, InteractiveListItem};
 
 #[derive(Debug, Clone)]
 pub struct PackageInfo {
@@ -719,7 +719,7 @@ impl PackagesState {
 
 impl crate::pages::AppPage for PackagesState {
     // Sections: [Packages, Package Info, System Update]
-    fn section_widgets(&mut self) -> Vec<Vec<*mut (dyn Element + 'static)>> {
+    fn section_widgets(&mut self) -> Vec<Vec<*mut (dyn WidgetHost + 'static)>> {
         vec![
             vec![self.search_box.as_ptr_mut()],
             Vec::new(),
@@ -780,7 +780,7 @@ impl crate::pages::AppPage for PackagesState {
         }
     }
 
-    fn extra_dispatch_roots(&mut self) -> Vec<*mut (dyn Element + 'static)> {
+    fn extra_dispatch_roots(&mut self) -> Vec<*mut (dyn WidgetHost + 'static)> {
         match self.active_tab {
             PackageTab::Installed => self.installed_items.iter_mut().map(|i| i.as_ptr_mut()).collect(),
             PackageTab::Updates => self.updates_items.iter_mut().map(|i| i.as_ptr_mut()).collect(),
diff --git a/src/pages/processes.rs b/src/pages/processes.rs
index 352445f..0a0b37f 100644
--- a/src/pages/processes.rs
+++ b/src/pages/processes.rs
@@ -1,7 +1,7 @@
 use crate::app::{AppAction, PageContent, SectionContextExt};
 use crate::scroll_region::ScrollRegion;
 use cce_ui::layout::{render_widget, PageLayoutBuilder, LayoutStrategy, RenderTarget};
-use cce_ui::widget::{TextBox, StatusDot, DotStatus, InteractiveListItem, Element};
+use cce_ui::widget::{TextBox, StatusDot, DotStatus, InteractiveListItem, WidgetHost};
 
 #[derive(Debug, Clone)]
 pub struct ServiceInfo {
@@ -482,7 +482,7 @@ fn service_action(name: &str, action: &str, is_system: bool) {
 
 impl crate::pages::AppPage for ProcessesState {
     // Sections: [Processes, Services]
-    fn section_widgets(&mut self) -> Vec<Vec<*mut (dyn Element + 'static)>> {
+    fn section_widgets(&mut self) -> Vec<Vec<*mut (dyn WidgetHost + 'static)>> {
         vec![
             Vec::new(),
             vec![self.services_search_box.as_ptr_mut()],
@@ -505,7 +505,7 @@ impl crate::pages::AppPage for ProcessesState {
 
     fn propagate_widget_changes(&mut self, _actions: &mut Vec<crate::app::AppAction>) {}
 
-    fn extra_dispatch_roots(&mut self) -> Vec<*mut (dyn Element + 'static)> {
+    fn extra_dispatch_roots(&mut self) -> Vec<*mut (dyn WidgetHost + 'static)> {
         self.service_items.iter_mut().map(|i| i.as_ptr_mut()).collect()
     }
 
diff --git a/src/pages/storage.rs b/src/pages/storage.rs
index ef81d1d..16beb8a 100644
--- a/src/pages/storage.rs
+++ b/src/pages/storage.rs
@@ -310,7 +310,7 @@ pub fn update(state: &mut StorageState, msg: StorageMessage) {
 
 impl crate::pages::AppPage for StorageState {
     // Sections: [Local Storage, Memory, Full System Backup] — no evented widgets.
-    fn section_widgets(&mut self) -> Vec<Vec<*mut (dyn cce_ui::widget::Element + 'static)>> {
+    fn section_widgets(&mut self) -> Vec<Vec<*mut (dyn cce_ui::widget::WidgetHost + 'static)>> {
         vec![Vec::new(), Vec::new(), Vec::new()]
     }
 
diff --git a/src/pages/system_info.rs b/src/pages/system_info.rs
index 3542c7c..90d85e2 100644
--- a/src/pages/system_info.rs
+++ b/src/pages/system_info.rs
@@ -1,6 +1,6 @@
 use crate::app::{AppAction, PageContent, SectionContextExt};
 use cce_ui::layout::{render_widget, PageLayoutBuilder, LayoutStrategy};
-use cce_ui::widget::{Label, Dropdown, InfoBox, Element, Button};
+use cce_ui::widget::{Label, Dropdown, InfoBox, WidgetHost, Button};
 
 #[derive(Debug, Clone, Default)]
 pub struct BatteryInfo {
@@ -820,8 +820,8 @@ pub fn update(state: &mut SystemState, msg: SystemMessage, ctx: &mut cce_ui::con
 
 impl crate::pages::AppPage for SystemState {
     // Sections: [System, System Actions, CPU, GPU, CPU Governor, GPU Power, Battery]
-    fn section_widgets(&mut self) -> Vec<Vec<*mut (dyn cce_ui::widget::Element + 'static)>> {
-        use cce_ui::widget::Element;
+    fn section_widgets(&mut self) -> Vec<Vec<*mut (dyn cce_ui::widget::WidgetHost + 'static)>> {
+        use cce_ui::widget::WidgetHost;
         vec![
             Vec::new(),
             Vec::new(),
diff --git a/src/renderer.rs b/src/renderer.rs
index a03a6a4..78c0946 100644
--- a/src/renderer.rs
+++ b/src/renderer.rs
@@ -1,7 +1,7 @@
 use crate::{SystemInterface, AppWidget, make_text_buffer_with_font};
 use cce_settings::app::PageContent;
 use cce_settings::pages::Page;
-use cce_ui::widget::Element;
+use cce_ui::widget::WidgetHost;
 
 type RectTuple = ([f32; 4], f32, f32, f32, f32, f32, (bool, bool, bool, bool));
 type TextTuple = (String, f32, f32, f32, [f32; 4], Option<String>, Option<[f32; 4]>);
@@ -13,7 +13,7 @@ type TextTuple = (String, f32, f32, f32, [f32; 4], Option<String>, Option<[f32;
 /// a window corner picks up the plate radius there); rounded quads are clipped;
 /// text bounds are clamped to the window (unbounded labels become window-bounded).
 fn collect_window_child(
-    w: &dyn Element,
+    w: &dyn WidgetHost,
     ctx: &cce_ui::context::UiContext,
     win_w: f32,
     win_h: f32,
diff --git a/src/scroll_bar.rs b/src/scroll_bar.rs
index bf26503..3c40d74 100644
--- a/src/scroll_bar.rs
+++ b/src/scroll_bar.rs
@@ -3,7 +3,7 @@
 //! assembly (`collect_window_child`) and evented directly (`dispatch_page_event` feeds it
 //! through `propagate_event`). Phase 6az: on the narrow traits, wrapped in
 //! `Adapted<ScrollBar>` — the constructor returns the wrapper so every call site keeps its
-//! shape (Element methods on the wrapper, fields/`update` through Deref).
+//! shape (WidgetHost methods on the wrapper, fields/`update` through Deref).
 
 use cce_ui::scene::layout::Rect;
 use cce_ui::scene::paint::PaintCtx;