summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-12-26 13:02:54 +0100
committerhut <hut@lavabit.com>2009-12-26 13:02:54 +0100
commit548929abc23ee001fa5c64616906a0ef95fa0eba (patch)
treef370d007ab414d5844ddb8f602333456bb34475b
parent20f949734282bbddb1c45951ea1f88419e7c992b (diff)
downloadranger-548929abc23ee001fa5c64616906a0ef95fa0eba.tar.gz
changed how tagged files are displayed
-rw-r--r--ranger/colorschemes/default.py4
-rw-r--r--ranger/gui/widgets/filelist.py12
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()
 
ame the previous revision' href='/akkartik/mu/blame/012transform.cc?h=main&id=3b107f1863930433e771a630dfbba095fa1fd6b0'>^
37e4573b ^



1ec3eb4c ^



5a481085 ^
215365d4 ^




5a481085 ^

215365d4 ^

1ec3eb4c ^
215365d4 ^
37e4573b ^
c442a5ad ^
848ebc1e ^
6c96a437 ^

37e4573b ^
37e4573b ^
91abd257 ^
363be37f ^
37e4573b ^


3ba63579 ^
7cca03bd ^
3ba63579 ^

7858a06a ^











3ba63579 ^
c442a5ad ^
6c96a437 ^
3ba63579 ^

6c96a437 ^
05d17773 ^
6c96a437 ^
05d17773 ^
3ba63579 ^
6c96a437 ^
05d17773 ^
3ba63579 ^





9cc16d04 ^
7f73795c ^
0f125d5f ^

37e4573b ^
a70ce311 ^





1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102