Skip to content

Commit 5635e76

Browse files
use correct icon size
1 parent fc1eabf commit 5635e76

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/modules/applications/application.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,11 @@ def install_icon(self, icon, icon_path):
146146
symlink_file(theme_icon, output_icon)
147147
elif ext_theme == "svg" and ext_orig == "png":
148148
from src.app import App
149-
App.svg().to_png(theme_icon, output_icon, icon_size)
149+
if icon_size != App.icon_size():
150+
App.svg().to_png(theme_icon, output_icon, App.icon_size())
151+
else:
152+
App.svg().to_png(theme_icon, output_icon)
153+
150154
mchown(output_icon)
151155

152156
def revert_icon(self, icon, icon_path):

src/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,10 @@ def get_pngbytes(icon):
250250
icon_extension = icon.theme_ext
251251
icon_size = icon.icon_size
252252
if icon_extension == 'svg':
253-
pngbytes = App.svg().to_bin(icon_for_repl, icon_size)
253+
if icon_size != App.icon_size():
254+
pngbytes = App.svg().to_bin(icon_for_repl, App.icon_size())
255+
else:
256+
pngbytes = App.svg().to_bin(icon_for_repl)
254257
elif icon_extension == "png":
255258
with open(icon_for_repl, 'rb') as pngfile:
256259
pngbytes = pngfile.read()

0 commit comments

Comments
 (0)