Skip to content

Commit

Permalink
[Updated] Add handling for distros that doesnt use new patches for pi…
Browse files Browse the repository at this point in the history
…xmap scaling
  • Loading branch information
DimitarCC authored and Huevos committed Aug 5, 2024
1 parent d26c88e commit 75d83cd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion weathercomponent/src/Components/Renderer/MSNWeatherPixmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ def updateIcon(self, filename):
if (self.iconFileName != new_IconFileName):
self.iconFileName = new_IconFileName
self.pix = LoadPixmap(self.iconFileName)
self.instance.setPixmapScale(BT_SCALE | BT_KEEP_ASPECT_RATIO)
try:
self.instance.setPixmapScale(BT_SCALE | BT_KEEP_ASPECT_RATIO)
except:
self.instance.setScale(1)
self.instance.setPixmap(self.pix)

def changed(self, what):
Expand Down
5 changes: 4 additions & 1 deletion weatherplugin/src/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,5 +270,8 @@ def updateIcon(self, filename):
if (self.IconFileName != new_IconFileName):
self.IconFileName = new_IconFileName
self.pix = LoadPixmap(self.IconFileName)
self.instance.setPixmapScale(BT_SCALE | BT_KEEP_ASPECT_RATIO)
try:
self.instance.setPixmapScale(BT_SCALE | BT_KEEP_ASPECT_RATIO)
except:
self.instance.setScale(1)
self.instance.setPixmap(self.pix)

0 comments on commit 75d83cd

Please sign in to comment.