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

commit95800b35cfb4a56b4252da421c82cf6857f4d631
parent86dec0a52d
authorLucas Galante <[email protected]>
date2026-08-19 13:57
style: the breadcrumb shares the dropdown's corner-radius knob

One knob, not two numbers agreeing: the breadcrumb reads
dropdown_corner_radius (style.control.dropdown.corner_radius), and the
breadcrumb_corner_radius knob is deleted whole — static, config parse,
key mapping, getter/setter. The two controls share a silhouette by
construction now; a leftover style.control.breadcrumb.corner_radius in
a config is silently ignored.

Co-Authored-By: Claude <[email protected]>

 src/layout.rs                      | 23 +----------------------
 src/widget/container/breadcrumb.rs |  5 ++++-
 2 files changed, 5 insertions(+), 23 deletions(-)

diff --git a/src/layout.rs b/src/layout.rs
index 8287c3a..6696214 100644
--- a/src/layout.rs
+++ b/src/layout.rs
@@ -66,7 +66,7 @@ fn flatten_json_to_flat_props(val: &serde_json::Value, prefix: &str, flat_props:
                 "style.list.font" | "style.data.list.font" => "list_font",
                 "style.list.font_color" | "style.data.list.font_color" => "list_font_color",
                 "style.control.breadcrumb.font" => "breadcrumb_font",
-                "style.control.breadcrumb.corner_radius" => "breadcrumb_corner_radius",
+
                 "style.control.button.padding" => "button_padding",
                 "style.control.button.height" => "button_height",
                 "style.control.button.corner_radius" => "button_corner_radius",
@@ -326,7 +326,6 @@ static DROPDOWN_CORNER_RADIUS: RwLock<f32> = RwLock::new(4.0);
 static TOGGLE_CORNER_RADIUS: RwLock<f32> = RwLock::new(4.0);
 static SLIDER_CORNER_RADIUS: RwLock<f32> = RwLock::new(4.0);
 static RANGESLIDER_CORNER_RADIUS: RwLock<f32> = RwLock::new(4.0);
-static BREADCRUMB_CORNER_RADIUS: RwLock<f32> = RwLock::new(4.0);
 static LIST_CORNER_RADIUS: RwLock<f32> = RwLock::new(4.0);
 static TREE_CORNER_RADIUS: RwLock<f32> = RwLock::new(4.0);
 static TOGGLE_BORDER_WIDTH: RwLock<f32> = RwLock::new(1.0);
@@ -599,15 +598,6 @@ pub fn reload_config() {
                     }
                 }
             }
-            if let Some(rest) = trimmed.strip_prefix("breadcrumb_corner_radius") {
-                let rest = rest.trim_start_matches(|c: char| c == ' ' || c == '=' || c == '"');
-                let val_str = rest.trim_end_matches('"').trim();
-                if let Ok(val) = val_str.parse::<f32>() {
-                    if let Ok(mut lock) = BREADCRUMB_CORNER_RADIUS.write() {
-                        *lock = val;
-                    }
-                }
-            }
             if let Some(rest) = trimmed.strip_prefix("list_corner_radius") {
                 let rest = rest.trim_start_matches(|c: char| c == ' ' || c == '=' || c == '"');
                 let val_str = rest.trim_end_matches('"').trim();
@@ -2915,17 +2905,6 @@ pub fn set_textbox_multiline_border_width(width: f32) {
     }
 }
 
-pub fn breadcrumb_corner_radius() -> f32 {
-    lazy_init_style_registry();
-    get_style_registry().read().unwrap().get_float("breadcrumb_corner_radius").unwrap_or(4.0)
-}
-
-pub fn set_breadcrumb_corner_radius(radius: f32) {
-    lazy_init_style_registry();
-    if let Ok(mut registry) = get_style_registry().write() {
-        registry.set_float("breadcrumb_corner_radius", radius);
-    }
-}
 
 pub fn list_corner_radius() -> f32 {
     lazy_init_style_registry();
diff --git a/src/widget/container/breadcrumb.rs b/src/widget/container/breadcrumb.rs
index 3dbe212..aa0e43c 100644
--- a/src/widget/container/breadcrumb.rs
+++ b/src/widget/container/breadcrumb.rs
@@ -276,7 +276,10 @@ impl Paint for Breadcrumb {
         // by seams engraved across it at a "/" lean. The old full-width
         // recessed well is gone: right of the run there is plain window
         // surface now, just as there is around the dropdown.
-        let radius = crate::layout::breadcrumb_corner_radius();
+        // ONE knob with the dropdown (style.control.dropdown.corner_radius):
+        // the two controls share a silhouette by construction, not by two
+        // numbers happening to agree.
+        let radius = crate::layout::dropdown_corner_radius();
         let relief = crate::layout::control_relief();
 
         let segs = self.visible_segs(rect);