widget gallery and compositor test bench
feat: dropdown popover on the direct PaintCtx path
PaintCtx is a RenderTarget — render_popover draws the real expanded
inset-plate surface (the status-interface grown-trigger treatment) with
its own per-label bounds; the PopoverCollector flatten-and-rebound
replay is gone. Where missing, ui_context_mut is exposed so the engine
ticks the context and drives the expand/contract animation frames.
Co-Authored-By: Claude Fable 5 <[email protected]>
src/main.rs | 26 +++++---------------------
1 file changed, 5 insertions(+), 21 deletions(-)
diff --git a/src/main.rs b/src/main.rs
index 7ad3fcf..6b2837a 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1640,20 +1640,19 @@ cascades in cce."
}
}
- // ── Popovers: geometry then labels, in-frame, on top of everything ──
- let mut popover_pc = cce_ui::layout::PopoverCollector::new();
+ // ── Popovers: in-frame, on top of everything. PaintCtx is a
+ // RenderTarget — real prims (the dropdown's expanded inset-plate
+ // surface) with per-label bounds; glyphs render in the later text pass
+ // regardless of emission order. ──
for i in 0..self.roster.len() {
let w = self.roster.get_dyn(i);
if !self.is_widget_visible(i) {
continue;
}
if w.popover_rect().is_some() {
- w.render_popover(&mut popover_pc);
+ w.render_popover(&mut pc);
}
}
- for &(qc, qx, qy, qw, qh) in &popover_pc.rects {
- pc.quad(Rect { x: qx, y: qy, width: qw, height: qh }, qc);
- }
// ── Text, as prims (the legacy rebuild_text_items assembly, uncached) ──
let label_text = if self.is_child {
@@ -1744,21 +1743,6 @@ cascades in cce."
}
}
- for (t, size, x, y, tc, font_opt, bounds) in popover_pc.texts {
- pc.text_with(
- t,
- x,
- y,
- size,
- [
- (tc[0] * 255.0) as u8,
- (tc[1] * 255.0) as u8,
- (tc[2] * 255.0) as u8,
- ],
- font_opt,
- bounds,
- );
- }
// The status line the old text_areas() override appended.
if !self.is_child {