Skip to content

Commit

Permalink
Get rid of black percentage bars :D!
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Thiel committed Jun 6, 2019
1 parent 3c76c0f commit 1f9cb8e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/interactive/widgets/entries.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::interactive::{
widgets::{COLOR_MARKED, COLOR_MARKED_DARK},
widgets::{COLOR_MARKED, COLOR_MARKED_DARK, COLOR_MARKED_DARKER},
DisplayOptions, EntryDataBundle, EntryMarkMap,
};
use dua::traverse::{Tree, TreeIndex};
Expand Down Expand Up @@ -131,7 +131,14 @@ impl Entries {
display.byte_vis.display(w.size as f32 / total as f32)
)
.into(),
style,
Style {
fg: match (is_selected, *is_focussed) {
(true, true) => COLOR_MARKED_DARK,
(true, false) => COLOR_MARKED_DARKER,
_ => style.fg,
},
..style
},
);

let name = Text::Styled(
Expand Down
1 change: 1 addition & 0 deletions src/interactive/widgets/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ use tui::style::Color;
pub const COLOR_MARKED: Color = Color::Yellow;
pub const COLOR_MARKED_LIGHT: Color = Color::LightYellow;
pub const COLOR_MARKED_DARK: Color = Color::Rgb(176, 126, 0);
pub const COLOR_MARKED_DARKER: Color = Color::Rgb(106, 66, 0);

0 comments on commit 1f9cb8e

Please sign in to comment.