diff options
author | hut <hut@lavabit.com> | 2009-12-26 13:02:54 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2009-12-26 13:02:54 +0100 |
commit | 548929abc23ee001fa5c64616906a0ef95fa0eba (patch) | |
tree | f370d007ab414d5844ddb8f602333456bb34475b /ranger | |
parent | 20f949734282bbddb1c45951ea1f88419e7c992b (diff) | |
download | ranger-548929abc23ee001fa5c64616906a0ef95fa0eba.tar.gz |
changed how tagged files are displayed
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/colorschemes/default.py | 4 | ||||
-rw-r--r-- | ranger/gui/widgets/filelist.py | 12 |
2 files changed, 13 insertions, 3 deletions
diff --git a/ranger/colorschemes/default.py b/ranger/colorschemes/default.py index 65441393..367445cb 100644 --- a/ranger/colorschemes/default.py +++ b/ranger/colorschemes/default.py @@ -42,6 +42,10 @@ class Default(ColorScheme): if context.tag_marker and not context.selected: attr |= bold + if fg in (red, magenta): + fg = white + else: + fg = red if context.maindisplay: if context.selected: diff --git a/ranger/gui/widgets/filelist.py b/ranger/gui/widgets/filelist.py index c6b654b4..95fcf8fe 100644 --- a/ranger/gui/widgets/filelist.py +++ b/ranger/gui/widgets/filelist.py @@ -7,6 +7,7 @@ class FileList(Widget): scroll_begin = 0 target = None postpone_drawing = False + tagged_marker = '*' def __init__(self, win, level): Widget.__init__(self, win) @@ -182,7 +183,7 @@ class FileList(Widget): if tagged: this_color.append('tagged') if self.main_display: - text = '* ' + text + text = self.tagged_marker + text if isinstance(drawed, Directory): this_color.append('directory') @@ -198,7 +199,11 @@ class FileList(Widget): string = drawed.basename if self.main_display: - if self.wid > 2: + if tagged: + if self.wid > 1: + self.win.addnstr(self.y + line, self.x, + text, self.wid - 2) + elif self.wid > 2: self.win.addnstr(self.y + line, self.x + 1, text, self.wid - 2) else: @@ -214,7 +219,8 @@ class FileList(Widget): if self.main_display and tagged and self.wid > 2: this_color.append('tag_marker') - self.color_at(self.y + line, self.x + 1, 1, this_color) + self.color_at(self.y + line, self.x, + len(self.tagged_marker), this_color) self.color_reset() |