git.lucas.co / cce-data-editor
structured data editor
git clone https://git.lucas.co/cce-data-editor.git

commit3e4835f53b2e90d143f890fecb35526a03090d2c
parent6045045ec6
authorLucas Galante <[email protected]>
date2026-09-22 13:06
fix: the context menu paints as the toolkit's lit plate

Through paint_with_labels, in place of the pre-frost flat quads every
other app has moved off. 2026-09-22 context-menu audit.

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

 src/main.rs | 31 ++++---------------------------
 1 file changed, 4 insertions(+), 27 deletions(-)

diff --git a/src/main.rs b/src/main.rs
index 03a19ef..0190f6d 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -2229,7 +2229,6 @@ impl Application for DataEditorApp {
         // carry bounds equal to their overlay rect: clips them to the plate and exempts
         // them from the dl-text occlusion clamp (the is-overlay-text convention).
         {
-            use cce_ui::scene::layout::Rect;
             for &pop_id in &self.ui_context.active_popovers {
                 let Some(pop_ptr) = self.ui_context.tree.get_ptr(pop_id) else { continue };
                 let popover = unsafe { &*pop_ptr };
@@ -2241,32 +2240,10 @@ impl Application for DataEditorApp {
                 // per-label bounds — no flattening collector round-trip.
                 popover.render_popover(&mut pc);
             }
-            if cce_ui::widget::context_menu::is_visible() {
-                let menu_bounds = Some([
-                    cce_ui::widget::context_menu::x(),
-                    cce_ui::widget::context_menu::y(),
-                    cce_ui::widget::context_menu::x() + cce_ui::widget::context_menu::w(),
-                    cce_ui::widget::context_menu::y() + cce_ui::widget::context_menu::h(),
-                ]);
-                for (qx, qy, qw, qh, qc) in cce_ui::widget::context_menu::extra_quads() {
-                    pc.quad(Rect { x: qx, y: qy, width: qw, height: qh }, qc);
-                }
-                // The menu font's family: a TextLabel carries only a size, so
-                // `None` here drew the menu in the default sans while the
-                // labels had been laid out in the configured face.
-                let (menu_family, _) = cce_ui::widget::context_menu::label_font();
-                for label in cce_ui::widget::context_menu::text_labels() {
-                    pc.text_with(
-                        label.text.clone(),
-                        label.x,
-                        label.y,
-                        label.font_size,
-                        label.color,
-                        Some(menu_family.clone()),
-                        menu_bounds,
-                    );
-                }
-            }
+            // The lit plate and the menu font in one call — the flat
+            // `extra_quads` look was the pre-frost menu the other apps
+            // have moved off.
+            cce_ui::widget::context_menu::paint_with_labels(&mut pc);
         }
 
         Some(pc.finish())