From 8bcc456caa1262f9b44947d6a6e2feec7c9a7790 Mon Sep 17 00:00:00 2001 From: Elias Date: Fri, 9 Oct 2026 18:04:31 +0100 Subject: [PATCH] ui: skip timeline ruler labels that would run under the marker bin The comp-end label was clipped to a stray "1" against the marker bin. (cherry picked from commit f62afa0364f1bf38f0b0b5eda5ccc07f33174790) (cherry picked from commit 2e3d08dad7d73a14688bf6d8bfb1712ab51443a2) (cherry picked from commit 773471c3a39bef51f4763d21d007534cfd95c0b1) --- crates/ui-egui/src/panels/timeline.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/panels/timeline.rs b/crates/ui-egui/src/panels/timeline.rs index 61b2d22d4..bd5d1d89c 100644 --- a/crates/ui-egui/src/panels/timeline.rs +++ b/crates/ui-egui/src/panels/timeline.rs @@ -1518,7 +1518,11 @@ pub fn show(app: &mut EffectcraftApp, ui: &mut egui::Ui, rect: Rect) { } else { format!("{:02}:{:02}f", fno / fps_i, fno % fps_i) }; - pr.text(pos2(x + 3.0, ruler.max.y - 16.0), Align2::LEFT_CENTER, label, Tokens::ui(10.0), t.tl_ruler_text); + // A label that would run under the marker bin is left out rather than cut to a stray digit. + let g = pr.layout_no_wrap(label, Tokens::ui(10.0), t.tl_ruler_text); + if x + 3.0 + g.size().x <= bin.min.x { + pr.galley(pos2(x + 3.0, ruler.max.y - 16.0 - g.size().y / 2.0), g, t.tl_ruler_text); + } for k in 1..5 { let xx = tm.x(s + secs_per_label * k as f64 / 5.0); pr.line_segment([pos2(xx, ruler.max.y - 4.0), pos2(xx, ruler.max.y)], Stroke::new(1.0, t.tl_ruler_tick.gamma_multiply(0.6)));