diff options
author | Stephan Dilly <dilly.stephan@gmail.com> | 2021-05-21 14:52:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-21 14:52:05 +0200 |
commit | 0e31d57a33c0e0d5028d5efc65f7794b66e2f139 (patch) | |
tree | 1de033a5862f56b217dee25ec0c37343cd95c2c2 /src/ui | |
parent | ca35426c6c30e95f38948bf746f5288725248d93 (diff) |
New file tree (#718)
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/style.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ui/style.rs b/src/ui/style.rs index 2a19e1f2..f62f3b4c 100644 --- a/src/ui/style.rs +++ b/src/ui/style.rs @@ -144,6 +144,20 @@ impl Theme { self.apply_select(style, selected) } + pub fn file_tree_item( + &self, + is_folder: bool, + selected: bool, + ) -> Style { + let style = if is_folder { + Style::default() + } else { + Style::default().fg(self.diff_file_modified) + }; + + self.apply_select(style, selected) + } + fn apply_select(&self, style: Style, selected: bool) -> Style { if selected { style.bg(self.selection_bg) |