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()
 
1' href='#n211'>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 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294