From 41071f0bbf17f3b875a5ada01eb2800efdd7f998 Mon Sep 17 00:00:00 2001 From: pravdomil <2387356+pravdomil@users.noreply.github.com> Date: Mon, 12 Oct 2026 16:30:04 +0200 Subject: [PATCH] Timeline: a one-line expression row is as tall as a normal row Drop the 6 px added to expression editor rows (and the matching offset in the drag-to-resize maths), so the row is a whole number of row heights. Co-Authored-By: Claude Opus 5.5 --- crates/ui-egui/src/panels/timeline.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/panels/timeline.rs b/crates/ui-egui/src/panels/timeline.rs index 72f10429..5bb85508 100644 --- a/crates/ui-egui/src/panels/timeline.rs +++ b/crates/ui-egui/src/panels/timeline.rs @@ -89,7 +89,7 @@ fn stripes(p: &egui::Painter, r: Rect, label: Color32) { /// Row height (expression editors grow with their text). fn row_height(row: &Row, rh: f32) -> f32 { match row.kind { - RowKind::Expr { lines, .. } => rh * lines as f32 + 6.0, + RowKind::Expr { lines, .. } => rh * lines as f32, RowKind::Waveform { .. } => rh * 3.0, _ => rh, } @@ -2391,7 +2391,7 @@ pub fn show(app: &mut EffectcraftApp, ui: &mut egui::Ui, rect: Rect) { ctx.set_cursor_icon(egui::CursorIcon::ResizeVertical); } if let Some(py) = eresp.interact_pointer_pos().filter(|_| eresp.dragged()).map(|p| p.y) { - let n = ((py - r.min.y - 6.0) / rh).round().clamp(1.0, EXPR_MAX_LINES as f32); + let n = ((py - r.min.y) / rh).round().clamp(1.0, EXPR_MAX_LINES as f32); app.ui.timeline.expr_lines.insert(*uid, n as usize); } let commit = resp.has_focus() && ui.input(|i| i.key_pressed(egui::Key::Enter) && (i.modifiers.command || i.modifiers.ctrl));