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

commit403269421493beea9db5042e981038e35ea3cff5
parent2547ae2229
authorLucas Galante <[email protected]>
date2026-07-02 21:47
Refactor ScrollingList to List and fix window decoration blur and styling

 src/pages/network.rs   |  8 ++++----
 src/pages/packages.rs  | 10 +++++-----
 src/pages/processes.rs | 18 +++++++++---------
 3 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/src/pages/network.rs b/src/pages/network.rs
index cf61de6..7d59fe9 100644
--- a/src/pages/network.rs
+++ b/src/pages/network.rs
@@ -1,6 +1,6 @@
 use crate::app::{AppAction, PageContent, SectionContextExt};
 use cce_ui::layout::{render_widget, PageLayoutBuilder, LayoutStrategy, RenderTarget};
-use cce_ui::widget::{ScrollingList, Toggle, Element};
+use cce_ui::widget::{List, Toggle, Element};
 
 #[derive(Debug, Clone)]
 pub struct WifiNetwork {
@@ -32,7 +32,7 @@ pub struct NetworkState {
     pub bt_enabled: bool,
     pub bt_devices: Vec<BluetoothDevice>,
     pub bt_scanning: bool,
-    pub wifi_list_box: ScrollingList,
+    pub wifi_list_box: List,
     pub wifi_toggle: Toggle,
     pub bt_toggle: Toggle,
 }
@@ -52,7 +52,7 @@ impl Default for NetworkState {
             bt_enabled: false,
             bt_devices: Vec::new(),
             bt_scanning: false,
-            wifi_list_box: ScrollingList::new(26.0, 4.0),
+            wifi_list_box: List::new(26.0, 4.0),
             wifi_toggle: Toggle::new(),
             bt_toggle: Toggle::new(),
         }
@@ -126,7 +126,7 @@ pub async fn fetch_network_state() -> NetworkState {
         ip_address, device, available,
         bt_installed, bt_service_active,
         bt_enabled, bt_devices, bt_scanning: false,
-        wifi_list_box: ScrollingList::new(26.0, 4.0),
+        wifi_list_box: List::new(26.0, 4.0),
         wifi_toggle: Toggle::new(),
         bt_toggle: Toggle::new(),
     }
diff --git a/src/pages/packages.rs b/src/pages/packages.rs
index 80cb259..d8aa50d 100644
--- a/src/pages/packages.rs
+++ b/src/pages/packages.rs
@@ -1,6 +1,6 @@
 use crate::app::{AppAction, PageContent, SectionContextExt};
 use cce_ui::layout::{render_widget, PageLayoutBuilder, LayoutStrategy, SectionContext, RenderTarget};
-use cce_ui::widget::{Element, ScrollingList, TextBox, InteractiveListItem};
+use cce_ui::widget::{Element, List, TextBox, InteractiveListItem};
 
 #[derive(Debug, Clone)]
 pub struct PackageInfo {
@@ -34,9 +34,9 @@ pub struct PackagesState {
     pub updates: Vec<UpdateInfo>,
     pub active_tab: PackageTab,
     pub search_box: TextBox,
-    pub installed_list_box: ScrollingList,
+    pub installed_list_box: List,
     pub installed_items: Vec<InteractiveListItem>,
-    pub updates_list_box: ScrollingList,
+    pub updates_list_box: List,
     pub updates_items: Vec<InteractiveListItem>,
     pub updating: bool,
     pub last_update_res: Option<Result<(), String>>,
@@ -54,9 +54,9 @@ impl Default for PackagesState {
             updates: Vec::new(),
             active_tab: PackageTab::Installed,
             search_box: TextBox::new(String::new()).with_placeholder("Filter Packages..."),
-            installed_list_box: ScrollingList::new(32.0, 4.0),
+            installed_list_box: List::new(32.0, 4.0),
             installed_items: Vec::new(),
-            updates_list_box: ScrollingList::new(32.0, 4.0),
+            updates_list_box: List::new(32.0, 4.0),
             updates_items: Vec::new(),
             updating: false,
             last_update_res: None,
diff --git a/src/pages/processes.rs b/src/pages/processes.rs
index a470866..f3501eb 100644
--- a/src/pages/processes.rs
+++ b/src/pages/processes.rs
@@ -1,6 +1,6 @@
 use crate::app::{AppAction, PageContent};
 use cce_ui::layout::{render_widget, PageLayoutBuilder, LayoutStrategy, RenderTarget};
-use cce_ui::widget::{ScrollingList, TextBox, StatusDot, DotStatus, InteractiveListItem, Element};
+use cce_ui::widget::{List, TextBox, StatusDot, DotStatus, InteractiveListItem, Element};
 
 #[derive(Debug, Clone)]
 pub struct ServiceInfo {
@@ -27,14 +27,14 @@ impl Default for ServiceTab {
 pub struct ProcessesState {
     pub loaded: bool,
     pub processes: Vec<(String, String, String)>, // (pid, cpu, comm)
-    pub cpu_list_box: ScrollingList,
+    pub cpu_list_box: List,
 
     // Services-related fields
     pub services_loaded: bool,
     pub services: Vec<ServiceInfo>,
     pub services_active_tab: ServiceTab,
     pub services_search_box: TextBox,
-    pub services_list_box: ScrollingList,
+    pub services_list_box: List,
     pub service_items: Vec<InteractiveListItem>,
 }
 
@@ -43,13 +43,13 @@ impl Default for ProcessesState {
         Self {
             loaded: false,
             processes: Vec::new(),
-            cpu_list_box: ScrollingList::new(24.0, 2.0),
+            cpu_list_box: List::new(24.0, 2.0),
 
             services_loaded: false,
             services: Vec::new(),
             services_active_tab: ServiceTab::System,
             services_search_box: TextBox::new(String::new()).with_label("Filter Services"),
-            services_list_box: ScrollingList::new(36.0, 6.0),
+            services_list_box: List::new(36.0, 6.0),
             service_items: Vec::new(),
         }
     }
@@ -92,12 +92,12 @@ pub async fn fetch_processes_state() -> ProcessesState {
     ProcessesState {
         loaded: true,
         processes,
-        cpu_list_box: ScrollingList::new(24.0, 2.0),
+        cpu_list_box: List::new(24.0, 2.0),
         services_loaded: false,
         services: Vec::new(),
         services_active_tab: ServiceTab::System,
         services_search_box: TextBox::new(String::new()).with_label("Filter Services"),
-        services_list_box: ScrollingList::new(36.0, 6.0),
+        services_list_box: List::new(36.0, 6.0),
         service_items: Vec::new(),
     }
 }
@@ -135,7 +135,7 @@ pub fn view(state: &mut ProcessesState, cx: f32, cy: f32, cw: f32, ch: f32, root
             sec.pc.text("CPU %", list_box_x + list_box_w - 60.0, list_box_y + 5.0, 11.0, [0.53, 0.53, 0.60, 1.0]);
 
             let row_h = 24.0;
-            // Update ScrollingList bounds for the scrollable viewport (which starts below the header)
+            // Update List bounds for the scrollable viewport (which starts below the header)
             state.cpu_list_box.update_bounds(state.processes.len(), list_box_y + header_h, list_box_h - header_h - 6.0);
 
             // Visible process rows rendering (virtualized/clipped)
@@ -251,7 +251,7 @@ pub fn view(state: &mut ProcessesState, cx: f32, cy: f32, cw: f32, ch: f32, root
                 .filter(|s| s.name.to_lowercase().contains(&query) || s.description.to_lowercase().contains(&query))
                 .collect();
 
-            // Update ScrollingList bounds
+            // Update List bounds
             state.services_list_box.update_bounds(filtered_services.len(), list_box_y, list_box_h);
 
             let item_h = state.services_list_box.item_height;