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()
 
<vc@akkartik.com> 2015-05-22 18:00:10 -0700 1419 - trace browser displays collapsed lines' href='/akkartik/mu/commit/077trace_browser.cc?h=hlt&id=3d8e5101d88acc20a50884c744b5fbf8b246409a'>3d8e5101 ^
3d8e5101 ^

bf458036 ^
3d8e5101 ^

293dbd7e ^
3d8e5101 ^

4243d710 ^

e02d7e98 ^
341239c9 ^

4243d710 ^






b1ce29dd ^
1725a858 ^
22d1a275 ^

b1ce29dd ^
1725a858 ^
22d1a275 ^

9463d417 ^
1725a858 ^
9463d417 ^


1725a858 ^
9463d417 ^


1725a858 ^
9463d417 ^

b1ce29dd ^
1725a858 ^
9463d417 ^
f22250a1 ^
9463d417 ^


b1ce29dd ^
1725a858 ^
63030ea7 ^
9463d417 ^

f3760b0f ^
9463d417 ^
9463d417 ^
4d03f69c ^
9463d417 ^

63030ea7 ^





f3760b0f ^
63030ea7 ^






293dbd7e ^
1725a858 ^
f3760b0f ^
f22250a1 ^
293dbd7e ^



f3760b0f ^
293dbd7e ^
293dbd7e ^


293dbd7e ^
293dbd7e ^



293dbd7e ^


293dbd7e ^

12f93e4a ^
1725a858 ^
f3760b0f ^
f22250a1 ^
12f93e4a ^
ff1f5976 ^

12f93e4a ^
f3760b0f ^
12f93e4a ^
ff1f5976 ^
12f93e4a ^


ff1f5976 ^

12f93e4a ^


4243d710 ^



341239c9 ^

4243d710 ^
341239c9 ^
4243d710 ^

f3760b0f ^
4243d710 ^



f22250a1 ^
341239c9 ^






f3760b0f ^
f22250a1 ^
4243d710 ^

1164aefc ^



777aae2e ^
1164aefc ^

4243d710 ^

4243d710 ^
22d1a275 ^
4243d710 ^







1164aefc ^
f3760b0f ^

f22250a1 ^
1164aefc ^
f22250a1 ^
1164aefc ^

4243d710 ^

1164aefc ^
4243d710 ^
1164aefc ^
4243d710 ^
1164aefc ^



4243d710 ^

10a3b8cc ^
4243d710 ^

8f249677 ^








bf458036 ^







8f249677 ^








bf458036 ^
8f249677 ^
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249