about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2011-10-01 18:21:58 +0200
committerhut <hut@lavabit.com>2011-10-01 18:21:58 +0200
commite421ce0877ba54c6efa832b5d4c98f95655fee03 (patch)
tree48c9350876097da05bacb11c6df0181986023256
parent7247fa714f1c39e6996f844261d57dca252f638d (diff)
downloadranger-e421ce0877ba54c6efa832b5d4c98f95655fee03.tar.gz
gui.bar: renamed attribute (width_of_first_letter -> min_size)
-rw-r--r--ranger/gui/bar.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/ranger/gui/bar.py b/ranger/gui/bar.py
index 0f2d8cd8..91ea99c1 100644
--- a/ranger/gui/bar.py
+++ b/ranger/gui/bar.py
@@ -119,7 +119,7 @@ class BarSide(list):
 			if item.fixed:
 				n += len(item)
 			else:
-				n += item.width_of_first_letter
+				n += item.min_size
 		return n
 
 	def nonfixed_items(self):
@@ -132,19 +132,19 @@ class ColoredString(object):
 		self.lst = lst
 		self.fixed = False
 		if not len(string):
-			self.width_of_first_letter = 0
+			self.min_size = 0
 		elif PY3:
-			self.width_of_first_letter = utf_char_width(string[0])
+			self.min_size = utf_char_width(string[0])
 		else:
-			self.width_of_first_letter = utf_char_width(self.string.chars[0].decode('utf-8'))
+			self.min_size = utf_char_width(self.string.chars[0].decode('utf-8'))
 
 	def cut_off(self, n):
 		if n >= 1:
 			self.string = self.string[:-n]
 
 	def cut_off_to(self, n):
-		if n < self.width_of_first_letter:
-			self.string = self.string[:self.width_of_first_letter]
+		if n < self.min_size:
+			self.string = self.string[:self.min_size]
 		elif n < len(self.string):
 			self.string = self.string[:n]