graphic design tool
git clone https://git.lucas.co/cce-designer.git
feat: a turning dialog's rows fade in with their text
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CLAUDE.md | 5 +++--
src/render.rs | 6 ++++--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/CLAUDE.md b/CLAUDE.md
index 8b970c4..260e096 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -2680,8 +2680,9 @@ Markers and Attribute Visualizers, a visualizer and Add Visualizer.
size off the hidden context menu), and a mode turned to while it is up
(Group Markers, a visualizer and back) slides its rows in from the side
it came from at the plate's own size. The render arm paints a turning
- dialog's content aside and replays it moved and clipped, its text faded
- and bounded by the plate as drawn, which is also the occluder the dialog
+ dialog's content aside and replays it moved, clipped and faded
+ (cce-ui's `Prim::faded`, geometry and text alike), its text bounded by
+ the plate as drawn, which is also the occluder the dialog
claims meanwhile (`Dialog::drawn_rect` in `popover`), so the clamp still
lets the labels through. A swipe back from the dialog shrinks the menu
out of the dialog's size (`context_menu::turn_from_size`). Checked in a
diff --git a/src/render.rs b/src/render.rs
index e534f96..ff00cfe 100644
--- a/src/render.rs
+++ b/src/render.rs
@@ -330,8 +330,10 @@ impl State {
if let Some(c) = item.clip {
pc.push_clip(c);
}
- if let Some(Prim::Text { text, x, y, font_size, color, alpha, font, .. }) = pc.replay(item.prim) {
- pc.text_faded(text, x, y, font_size, color, alpha * e * e, font, bounds);
+ // Everything comes up with the turn, as a
+ // menu page's rows do (`Prim::faded`).
+ if let Some(Prim::Text { text, x, y, font_size, color, alpha, font, .. }) = pc.replay(item.prim.faded(e * e)) {
+ pc.text_faded(text, x, y, font_size, color, alpha, font, bounds);
}
if item.clip.is_some() {
pc.pop_clip();