git.lucas.co / cce-designer
graphic design tool
git clone https://git.lucas.co/cce-designer.git

commit2f0cf3d1d6c80500e6fcb3c898c393482f3967bc
parenta7115d8dd8
authorLucas Galante <[email protected]>
date2026-07-12 00:06
refactor(render): drop the dead parent_plate_rect text clamp (Phase 6at)

Element::is_plate is constant-false (deleted from cce-ui in the 6at
fold sweep): no widget here claims plate-hood since the Plate
dissolution, so the per-widget plate-ancestor walk and the text-bounds
intersection it fed were dead. A/B on the live compositor: only
unrelated terminal text behind the translucent window differs.

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

 src/render.rs | 31 +------------------------------
 1 file changed, 1 insertion(+), 30 deletions(-)

diff --git a/src/render.rs b/src/render.rs
index 30083a6..b295046 100644
--- a/src/render.rs
+++ b/src/render.rs
@@ -677,7 +677,7 @@ impl State {
             let is_node = i == CONTENT_IDX;
             let is_network_part = i == CONTENT_IDX || i == LEFT_MENUBAR_IDX || i == BREADCRUMB_IDX || i == NETWORK_PANEL_IDX;
 
-            let mut bounds = if is_node {
+            let bounds = if is_node {
                 if circular_network_pane {
                     TextBounds {
                         left: ((network_circle_x - network_circle_radius) * s) as i32,
@@ -703,35 +703,6 @@ impl State {
                 }
             };
 
-            let is_menu_related = w.type_name() == "MenuBar" || w.type_name() == "Menu";
-
-            let mut parent_plate_rect = if !is_menu_related && w.is_plate() {
-                Some(w.rect())
-            } else {
-                None
-            };
-            if !is_menu_related && parent_plate_rect.is_none() {
-                let mut curr_ptr = w.as_ref() as *const dyn Element as *mut dyn Element;
-                unsafe {
-                    while let Some(parent_ptr) = (*curr_ptr).parent(ui_context) {
-                        if (*parent_ptr).is_plate() {
-                            parent_plate_rect = Some((*parent_ptr).rect());
-                            break;
-                        }
-                        curr_ptr = parent_ptr;
-                    }
-                }
-            }
-
-            if let Some((px, py, pw, ph)) = parent_plate_rect {
-                bounds = TextBounds {
-                    left: bounds.left.max((px * s).round() as i32),
-                    top: bounds.top.max((py * s).round() as i32),
-                    right: bounds.right.min(((px + pw) * s).round() as i32),
-                    bottom: bounds.bottom.min(((py + ph) * s).round() as i32),
-                };
-            }
-
             for (text, x, y, font_size, color, font, label_bounds) in &widget_text[i] {
                 let mut is_curved = false;
                 if circular_network_pane && i == LEFT_MENUBAR_IDX && text.chars().count() == 1 {