git.lucas.co / cce-ui
GPU-accelerated UI toolkit (Vulkan)
git clone https://git.lucas.co/cce-ui.git

commitdbd075364d83daabda5607ce169904cd2cd5d35d
parentb72318875f
authorLucas Galante <[email protected]>
date2026-06-15 14:59
Rename paginator_tab_label_color to menubar_tab_label_color

 src/color.rs                      | 16 +++++++++-------
 src/widget/container/menu.rs      |  4 ++--
 src/widget/container/paginator.rs |  4 ++--
 src/widget/input/button_strip.rs  |  2 +-
 4 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/src/color.rs b/src/color.rs
index f90496e..bff5603 100644
--- a/src/color.rs
+++ b/src/color.rs
@@ -31,7 +31,7 @@ static COLOR_BORDERS_COLOR: RwLock<[f32; 4]> = RwLock::new([0.2039, 0.2039, 0.25
 static NODE_COLOR: RwLock<[f32; 4]> = RwLock::new(NODE_IDLE);
 static SIDEBAR_BG_COLOR: RwLock<[f32; 4]> = RwLock::new(SIDEBAR_BG);
 static HIGHLIGHT_PRIMARY_COLOR: RwLock<[f32; 4]> = RwLock::new(HIGHLIGHT_PRIMARY);
-static PAGINATOR_TAB_LABEL_COLOR: RwLock<[f32; 4]> = RwLock::new([0.90196, 0.90196, 0.94902, 1.0]); // sRGB [230, 230, 242] linear
+static MENUBAR_TAB_LABEL_COLOR: RwLock<[f32; 4]> = RwLock::new([0.90196, 0.90196, 0.94902, 1.0]); // sRGB [230, 230, 242] linear
 static OPACITY: RwLock<Option<f32>> = RwLock::new(None);
 static TOGGLE_ON_COLOR: RwLock<[f32; 4]> = RwLock::new(TOGGLE_ON);
 static TOGGLE_OFF_COLOR: RwLock<[f32; 4]> = RwLock::new(TOGGLE_OFF);
@@ -138,8 +138,10 @@ fn parse_and_set_colors(content: &str) {
         if let Some(c) = parse_hex(trimmed, "primary_highlight_color") {
             if let Ok(mut lock) = HIGHLIGHT_PRIMARY_COLOR.write() { *lock = [c[0], c[1], c[2], 0.12]; }
         }
-        if let Some(c) = parse_hex(trimmed, "paginator_tab_label_color") {
-            if let Ok(mut lock) = PAGINATOR_TAB_LABEL_COLOR.write() { *lock = c; }
+        if let Some(c) = parse_hex(trimmed, "menubar_tab_label_color") {
+            if let Ok(mut lock) = MENUBAR_TAB_LABEL_COLOR.write() { *lock = c; }
+        } else if let Some(c) = parse_hex(trimmed, "paginator_tab_label_color") {
+            if let Ok(mut lock) = MENUBAR_TAB_LABEL_COLOR.write() { *lock = c; }
         }
         if let Some(c) = parse_hex(trimmed, "toggle_enabled_color") {
             if let Ok(mut lock) = TOGGLE_ON_COLOR.write() { *lock = c; }
@@ -283,13 +285,13 @@ pub fn set_highlight_primary_color(color: [f32; 4]) {
     }
 }
 
-pub fn paginator_tab_label_color() -> [f32; 4] {
+pub fn menubar_tab_label_color() -> [f32; 4] {
     load_colors_once();
-    *PAGINATOR_TAB_LABEL_COLOR.read().unwrap()
+    *MENUBAR_TAB_LABEL_COLOR.read().unwrap()
 }
 
-pub fn set_paginator_tab_label_color(color: [f32; 4]) {
-    if let Ok(mut lock) = PAGINATOR_TAB_LABEL_COLOR.write() {
+pub fn set_menubar_tab_label_color(color: [f32; 4]) {
+    if let Ok(mut lock) = MENUBAR_TAB_LABEL_COLOR.write() {
         *lock = color;
     }
 }
diff --git a/src/widget/container/menu.rs b/src/widget/container/menu.rs
index e68d4ac..1bbdf88 100644
--- a/src/widget/container/menu.rs
+++ b/src/widget/container/menu.rs
@@ -721,7 +721,7 @@ impl Element for MenuBar {
         if !self.visible {
             return Vec::new();
         }
-        let label_color = crate::colors::paginator_tab_label_color();
+        let label_color = crate::colors::menubar_tab_label_color();
         let srgb = crate::colors::to_srgb(label_color);
         let text_color = [
             (srgb[0] * 255.0) as u8,
@@ -1178,7 +1178,7 @@ impl Element for Menu {
     }
 
     fn text_labels(&self) -> Vec<TextLabel> {
-        let label_color = crate::colors::paginator_tab_label_color();
+        let label_color = crate::colors::menubar_tab_label_color();
         let srgb = crate::colors::to_srgb(label_color);
         let text_color = [
             (srgb[0] * 255.0) as u8,
diff --git a/src/widget/container/paginator.rs b/src/widget/container/paginator.rs
index 280ca93..ef7a1b8 100644
--- a/src/widget/container/paginator.rs
+++ b/src/widget/container/paginator.rs
@@ -371,7 +371,7 @@ impl Paginator {
     fn generate_tab_quads(&mut self) {
         self.tab_text_quads.clear();
         let (tab_w, _) = self.vertical_tab_size();
-        let active_color = colors::paginator_tab_label_color();
+        let active_color = colors::menubar_tab_label_color();
         let active_srgb = colors::to_srgb(active_color);
         let active_r = (active_srgb[0] * 255.0) as u8;
         let active_g = (active_srgb[1] * 255.0) as u8;
@@ -665,7 +665,7 @@ impl Element for Paginator {
 
             let (tab_w, _) = self.vertical_tab_size();
             let padding_y = crate::layout::paginator_tab_padding_y();
-            let active_color = colors::paginator_tab_label_color();
+            let active_color = colors::menubar_tab_label_color();
             let active_srgb = colors::to_srgb(active_color);
             let active_r = (active_srgb[0] * 255.0) as u8;
             let active_g = (active_srgb[1] * 255.0) as u8;
diff --git a/src/widget/input/button_strip.rs b/src/widget/input/button_strip.rs
index 8eccb87..bcb9e38 100644
--- a/src/widget/input/button_strip.rs
+++ b/src/widget/input/button_strip.rs
@@ -74,7 +74,7 @@ impl ButtonStrip {
             return;
         }
 
-        let active_color = colors::paginator_tab_label_color();
+        let active_color = colors::menubar_tab_label_color();
         let active_srgb = colors::to_srgb(active_color);
         let active_r = (active_srgb[0] * 255.0) as u8;
         let active_g = (active_srgb[1] * 255.0) as u8;