Skip to content

Commit 72f25f7

Browse files
author
queenkjuul
committed
cleanup
1 parent 1606304 commit 72f25f7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/weather.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ def __init__(self, initial_monitor=0, low_res=False):
4040
big_box = Gtk.Box(Gtk.Orientation.HORIZONTAL)
4141
self.add(big_box)
4242
big_box.show()
43-
self.icon_size = ICON_SIZE
4443

4544
# icon
45+
self.icon_size = ICON_SIZE
4646
self.condition_icon = Gtk.Image()
4747
self.condition_icon.set_size_request(self.icon_size, self.icon_size)
4848
big_box.pack_start(self.condition_icon, False, False, 6)
@@ -90,12 +90,12 @@ def get_location(self):
9090
return LocationData(lat, lon)
9191

9292
def update_weather(self):
93-
message_font = Pango.FontDescription.from_string(settings.get_message_font())
93+
desc_font = Pango.FontDescription.from_string(settings.get_message_font())
9494
weather_font = Pango.FontDescription.from_string(settings.get_weather_font())
9595

9696
if self.low_res:
97-
msg_size = message_font.get_size() * 0.66
98-
message_font.set_size(int(msg_size))
97+
desc_size = desc_font.get_size() * 0.66
98+
desc_font.set_size(int(desc_size))
9999

100100
weather_data = self.weather_provider.GetWeather(self.location)
101101

@@ -107,15 +107,15 @@ def update_weather(self):
107107
else weather_data.temp_c()
108108
)
109109
temp_string = str(round(temp))
110-
default_message = (
110+
desc_message = (
111111
weather_data.condition.description.title()
112112
+ in_str
113113
+ weather_data.location.city.capitalize()
114114
)
115115

116116
markup = '<b><span font_desc="%s" foreground="#CCCCCC">%s</span></b>\n ' % (
117-
message_font.to_string(),
118-
default_message,
117+
desc_font.to_string(),
118+
desc_message,
119119
)
120120

121121
self.temp_label.set_markup(

0 commit comments

Comments
 (0)