[kupfer] ui: Make favorite star and content arrow line up in columns



commit 36dbaac9e6357ff19529c9b47d4b74ce3d067e2d
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Thu Mar 3 01:26:09 2011 +0100

    ui: Make favorite star and content arrow line up in columns
    
    Insert an aligning space so that stars and arrow are in separate
    columns in the result list/browse window.

 kupfer/ui/browser.py |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/kupfer/ui/browser.py b/kupfer/ui/browser.py
index e562a51..24fd9d3 100644
--- a/kupfer/ui/browser.py
+++ b/kupfer/ui/browser.py
@@ -195,15 +195,19 @@ class LeafModel (object):
 
 	def get_aux_info(self, leaf):
 		# info: display arrow if leaf has content
+		fill_space = u"\N{EM SPACE}"
 		if text_direction_is_ltr():
 			content_mark = u"\N{BLACK RIGHT-POINTING SMALL TRIANGLE}"
 		else:
 			content_mark = u"\N{BLACK LEFT-POINTING SMALL TRIANGLE}"
+
 		info = u""
-		if hasattr(leaf, "has_content") and leaf.has_content():
-			info = content_mark
 		if learn.is_favorite(leaf):
 			info += u"\N{BLACK STAR}"
+		else:
+			info += fill_space
+		if hasattr(leaf, "has_content") and leaf.has_content():
+			info += content_mark
 		return info
 	def get_rank_str(self, rank):
 		# Display rank empty instead of 0 since it looks better



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]