From 00aa9439fe9b13074d647cea1eebd6562ff49b46 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Tue, 3 Nov 2026 15:33:13 +0100 Subject: [PATCH] Show selected rundown rows with a subtle background tint --- crates/rundown-converter/src/gui/review.rs | 15 +++++++++++++-- docs/rundown-converter.md | 3 ++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/crates/rundown-converter/src/gui/review.rs b/crates/rundown-converter/src/gui/review.rs index c6fbb5f..e755da7 100644 --- a/crates/rundown-converter/src/gui/review.rs +++ b/crates/rundown-converter/src/gui/review.rs @@ -907,6 +907,12 @@ impl App { let mut jump_offset = None; let mut resolve = None; let mut details = None; + let selected: Vec<_> = std::iter::once(false) + .chain( + rows.iter() + .map(|row| row.row > 0 && self.selected_row == Some(row.row)), + ) + .collect(); let backgrounds: Vec<_> = std::iter::once(None) .chain(rows.iter().map(|row| { if row.automatically_ignored || ignored_row(row.row, table, &profile) { @@ -937,9 +943,13 @@ impl App { egui::Grid::new("schedule") .spacing(egui::vec2(10.0, 12.0)) .with_row_color(move |row, style| { - backgrounds.get(row).copied().flatten().or_else(|| { + let background = backgrounds.get(row).copied().flatten().or_else(|| { (row > 0 && row % 2 == 0).then_some(style.visuals.faint_bg_color) - }) + }); + if selected.get(row).copied().unwrap_or(false) { + Some(background.unwrap_or(style.visuals.panel_fill) + .lerp_to_gamma(style.visuals.selection.bg_fill, 0.28)) + } else { background } }) .show(ui, |ui| { ui.strong("Row"); @@ -1124,6 +1134,7 @@ impl App { if row.row > 0 && ui.rect_contains_pointer(row_rect) { if ui.input(|i| i.pointer.primary_clicked()) { self.selected_row = Some(row.row); + ui.ctx().request_repaint(); } if !ui.rect_contains_pointer(controls.response.rect) && ui.input(|i| i.pointer.button_double_clicked(egui::PointerButton::Primary)) { diff --git a/docs/rundown-converter.md b/docs/rundown-converter.md index ba30e0e..6ef86c1 100644 --- a/docs/rundown-converter.md +++ b/docs/rundown-converter.md @@ -57,7 +57,8 @@ Review has two views: - **Schedule & corrections** combines the schedule preview and row editing in one table. Start/end/duration, titles, colored issues and row types are visible - together. Click anywhere on a source row to target it for editing. + together. Click anywhere on a source row to target it for editing; a subtle tint marks + the selected row while retaining its status color. **Edit row…** opens the selected row editor, including duration correction. **All rows** includes ignored rows; **Included rows** hides ignored rows and rows containing only ignored columns, while keeping notes, markers and breaks; **Needs attention** shows rows with