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

commit21022cb7747d24b8a7387b964cbc39d526c671c6
parent2f7be33386
authorLucas Galante <lsgalante12@gmail.com>
date2026-10-06 10:12
fix(chrome): the page switcher at the toolkit's dropdown height

The status bar's page dropdown was a hand-set 18px in a 24px bar. It now
asks for dropdown_height(), and the bar is sized from it (plus the same
3px inset top and bottom) rather than the switcher being shrunk to fit
the bar: 30px at the default control height.

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

 src/main.rs     | 4 +++-
 src/renderer.rs | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/main.rs b/src/main.rs
index bc9069d..46d523d 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -261,7 +261,9 @@ impl cce_ui::engine::Application for SystemInterface {
             page_buttons: Vec::new(),
             sidebar_width,
             header_height: 0.0,
-            status_height: 24.0,
+            // The page switcher at the toolkit's dropdown height, inset 3px
+            // top and bottom: the bar grows with the control, not the reverse.
+            status_height: cce_ui::layout::dropdown_height() + 6.0,
             cursor_x: 0.0,
             cursor_y: 0.0,
             rx_audio: watchers.rx_audio,
diff --git a/src/renderer.rs b/src/renderer.rs
index d50edc6..e09e2e3 100644
--- a/src/renderer.rs
+++ b/src/renderer.rs
@@ -157,7 +157,7 @@ impl SystemInterface {
 
         // Position sidebar and switcher below the titlebar
         let mut dummy_pc = PageContent::new();
-        let dropdown_h = 18.0f32;
+        let dropdown_h = cce_ui::layout::dropdown_height();
         let size = self.page_dropdown.measure(
             cce_ui::widget::LayoutConstraints::new(0.0, 500.0, dropdown_h, dropdown_h),
             &self.ui_context,