Skip to content

Commit

Permalink
Override text color with stroke selection color for selected cells (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
njust authored Feb 5, 2024
1 parent bfdfb88 commit a41a04d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/egui_extras/src/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,11 @@ impl<'l> StripLayout<'l> {
child_ui.set_clip_rect(clip_rect.intersect(child_ui.clip_rect()));
}

if flags.selected {
let stroke_color = child_ui.style().visuals.selection.stroke.color;
child_ui.style_mut().visuals.override_text_color = Some(stroke_color);
}

add_cell_contents(&mut child_ui);
child_ui.min_rect()
}
Expand Down

0 comments on commit a41a04d

Please sign in to comment.