Skip to content

Commit

Permalink
[MSNWeatherPixmap]
Browse files Browse the repository at this point in the history
* final fix for LoadPixmap
  • Loading branch information
jbleyel committed Aug 23, 2024
1 parent ba57023 commit 2578e9f
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions weathercomponent/src/Components/Renderer/MSNWeatherPixmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,15 @@ def updateIcon(self, filename):
new_IconFileName = filename
if (self.iconFileName != new_IconFileName):
self.iconFileName = new_IconFileName
self.pix = LoadPixmap(self.iconFileName)
try:
self.instance.setPixmapScale(BT_SCALE | BT_KEEP_ASPECT_RATIO)
except:
self.instance.setScale(1)
self.instance.setPixmap(self.pix)
if self.iconFileName:
self.pix = LoadPixmap(self.iconFileName)
try:
self.instance.setPixmapScale(BT_SCALE | BT_KEEP_ASPECT_RATIO)
except:
self.instance.setScale(1)
self.instance.setPixmap(self.pix)
else:
self.instance.setPixmap(None)

def changed(self, what):
if what[0] != self.CHANGED_CLEAR:
Expand Down

0 comments on commit 2578e9f

Please sign in to comment.