Show selected rundown rows with a subtle background tint
This commit is contained in:
parent
e42fdcd20f
commit
00aa9439fe
|
|
@ -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)) {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue