@@ -17,8 +17,8 @@ def __init__(self, size):
17
17
self ._max_height = math .ceil (self ._max_width * self ._height / self ._width )
18
18
19
19
# Final size of the frame
20
- self .__width = None
21
- self .__height = None
20
+ self ._final_width = None
21
+ self ._final_height = None
22
22
23
23
@property
24
24
def compress (self ):
@@ -38,17 +38,17 @@ def columns_count(self):
38
38
@property
39
39
def width (self ):
40
40
"""Calculates and caches the frame width."""
41
- if not self .__width :
42
- self .__width = round (self ._width * self .compress )
43
- self .__width = max (self .__width , self ._min_width )
44
- self .__width = min (self .__width , self ._max_width )
45
- return self .__width
41
+ if not self ._final_width :
42
+ self ._final_width = round (self ._width * self .compress )
43
+ self ._final_width = max (self ._final_width , self ._min_width )
44
+ self ._final_width = min (self ._final_width , self ._max_width )
45
+ return self ._final_width
46
46
47
47
@property
48
48
def height (self ):
49
49
"""Calculates and caches the frame height."""
50
- if not self .__height :
51
- self .__height = round (self ._height * self .compress )
52
- self .__height = max (self .__height , self ._min_height )
53
- self .__height = min (self .__height , self ._max_height )
54
- return self .__height
50
+ if not self ._final_height :
51
+ self ._final_height = round (self ._height * self .compress )
52
+ self ._final_height = max (self ._final_height , self ._min_height )
53
+ self ._final_height = min (self ._final_height , self ._max_height )
54
+ return self ._final_height
0 commit comments