diff options
author | Sebastian Thiel <sebastian.thiel@icloud.com> | 2020-07-22 10:45:40 +0800 |
---|---|---|
committer | Sebastian Thiel <sebastian.thiel@icloud.com> | 2020-07-22 10:45:40 +0800 |
commit | 839b9323d93b9f562f6414cd66504b6d686c0224 (patch) | |
tree | dec25a406b00786c03d7afc3e683f54a4dd632e4 /src/interactive/widgets/mod.rs | |
parent | 773497cc48a406a069be84e14194d51484fdbec2 (diff) |
Upgrade to tui 0.10 step one…tui-react-v0.10.0
…which can be followed by a crosstermion upgrade once
prodash/crosstermion have caught up.
Diffstat (limited to 'src/interactive/widgets/mod.rs')
-rw-r--r-- | src/interactive/widgets/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/interactive/widgets/mod.rs b/src/interactive/widgets/mod.rs index 5e37423..dd1f8c3 100644 --- a/src/interactive/widgets/mod.rs +++ b/src/interactive/widgets/mod.rs @@ -17,11 +17,11 @@ use tui::style::Color; pub const COLOR_MARKED: Color = Color::Yellow; pub const COLOR_MARKED_DARK: Color = Color::Rgb(176, 126, 0); -fn entry_color(fg: Color, is_file: bool, is_marked: bool) -> Color { +fn entry_color(fg: Option<Color>, is_file: bool, is_marked: bool) -> Option<Color> { match (is_file, is_marked) { - (true, false) => Color::DarkGray, - (true, true) => COLOR_MARKED_DARK, - (false, true) => COLOR_MARKED, + (true, false) => Color::DarkGray.into(), + (true, true) => COLOR_MARKED_DARK.into(), + (false, true) => COLOR_MARKED.into(), _ => fg, } } |