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]
 
ranger.py: more fixes' href='/akspecs/ranger/commit/ranger.py?h=v1.2.0&id=eaa081deafe64db79effe9ab269fc44a9f63bbe6'>eaa081de ^
4d6c426f ^
5e449699 ^
4d6c426f ^
5e449699 ^
4d6c426f ^

a66c4a26 ^
3de15ddd ^
a66c4a26 ^


f027adc0 ^
5c210a96 ^

3de15ddd ^

5c210a96 ^
fb275079 ^

5c210a96 ^
3d566884 ^
a1d7ed6e ^
3d566884 ^
f8e96a97 ^
465bff73 ^





f027adc0 ^
f8e96a97 ^

0b5c4cbe ^
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