node-based graph editor
git clone https://git.lucas.co/cce-graph.git
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 3ee4826..1924b0c 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1362,7 +1362,6 @@ impl Application for GraphApp {
// nothing else paints them). Labels carry bounds equal to the popover rect, which
// clips them to the plate and exempts them from the dl-text occlusion clamp.
{
- 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 };
@@ -1374,32 +1373,10 @@ impl Application for GraphApp {
// 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())