From 5256936bf41e7ab5f117ebd093f7ed71281b2e21 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Tue, 3 Nov 2026 15:49:01 +0100 Subject: [PATCH] Tint navigation tabs for visual distinction --- crates/rundown-converter/src/gui.rs | 35 +++++++++++++++++++--- crates/rundown-converter/src/gui/review.rs | 16 ++++++---- docs/rundown-converter.md | 3 ++ 3 files changed, 45 insertions(+), 9 deletions(-) diff --git a/crates/rundown-converter/src/gui.rs b/crates/rundown-converter/src/gui.rs index 40b72c6..b887f95 100644 --- a/crates/rundown-converter/src/gui.rs +++ b/crates/rundown-converter/src/gui.rs @@ -65,6 +65,27 @@ struct App { replace_profile: bool, resolution_dir: Option, } + +fn navigation_tab(ui: &mut egui::Ui, label: &str, selected: bool) -> egui::Response { + let fill = if selected { + Color32::from_rgb(87, 68, 181) + } else { + Color32::from_rgb(43, 38, 66) + }; + let text = if selected { + Color32::WHITE + } else { + Color32::from_rgb(196, 188, 235) + }; + ui.add( + egui::Button::new(RichText::new(label).color(text)) + .selected(selected) + .fill(fill) + .stroke(egui::Stroke::new(1.0_f32, Color32::from_rgb(74, 63, 116))) + .corner_radius(4.0), + ) +} + impl Default for App { fn default() -> Self { Self { @@ -699,10 +720,16 @@ impl App { ui.horizontal(|ui| { ui.strong("Rundown converter"); ui.separator(); - ui.selectable_value(&mut self.tab, Tab::Setup, "Setup"); - ui.selectable_value(&mut self.tab, Tab::Review, "Review"); - ui.selectable_value(&mut self.tab, Tab::Results, "Results"); - ui.selectable_value(&mut self.tab, Tab::Details, "Details"); + for (tab, label) in [ + (Tab::Setup, "Setup"), + (Tab::Review, "Review"), + (Tab::Results, "Results"), + (Tab::Details, "Details"), + ] { + if navigation_tab(ui, label, self.tab == tab).clicked() { + self.tab = tab; + } + } }); }); egui::TopBottomPanel::bottom("action").show(ctx, |ui| { diff --git a/crates/rundown-converter/src/gui/review.rs b/crates/rundown-converter/src/gui/review.rs index 43e29d5..4d828ff 100644 --- a/crates/rundown-converter/src/gui/review.rs +++ b/crates/rundown-converter/src/gui/review.rs @@ -406,12 +406,18 @@ impl App { }); } ui.horizontal_wrapped(|ui| { - ui.selectable_value( - &mut self.review_view, - ReviewView::Rows, + if navigation_tab( + ui, "Schedule & corrections", - ); - ui.selectable_value(&mut self.review_view, ReviewView::Columns, "Columns"); + self.review_view == ReviewView::Rows, + ) + .clicked() + { + self.review_view = ReviewView::Rows; + } + if navigation_tab(ui, "Columns", self.review_view == ReviewView::Columns).clicked() { + self.review_view = ReviewView::Columns; + } if ui.button("Save resolutions…").clicked() { self.resolutions_open = true; } diff --git a/docs/rundown-converter.md b/docs/rundown-converter.md index 82d231a..a4f339a 100644 --- a/docs/rundown-converter.md +++ b/docs/rundown-converter.md @@ -55,6 +55,9 @@ cells marked as times display as `HH:MM:SS` in samples and the inspector; the original stored value remains available in the inspector. Review has two views: +The main navigation and Review view tabs use a subtle purple tint so they remain +visually distinct from labels and ordinary actions; the active tab uses the stronger accent. + - **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 or inferred gap to select it; a subtle tint marks