Override text color with stroke selection color for selected cells (#3968)

Closes #3967 


![image](https://github.com/emilk/egui/assets/2380253/4aaa55bd-e6dc-4780-a9b1-14d537d10116)
This commit is contained in:
njust 2024-02-05 09:17:22 +01:00 committed by GitHub
parent bfdfb8894d
commit a41a04d635
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -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()
}