mirror of
https://github.com/borgbase/vorta
synced 2025-01-03 05:36:19 +00:00
Set all icons to same height (#660)
This commit is contained in:
parent
6df94f07f9
commit
856fb73f14
1 changed files with 2 additions and 4 deletions
|
@ -9,9 +9,7 @@ def get_colored_icon(icon_name):
|
|||
svg_str = open(get_asset(f"icons/{icon_name}.svg"), 'rb').read()
|
||||
if uses_dark_mode():
|
||||
svg_str = svg_str.replace(b'#00000', b'#ffffff')
|
||||
svg_img = QImage.fromData(svg_str)
|
||||
|
||||
# Reduce image size to 1/14th
|
||||
svg_img = svg_img.scaled(svg_img.size() / 14)
|
||||
# Reduce image size to 128 height
|
||||
svg_img = QImage.fromData(svg_str).scaledToHeight(128)
|
||||
|
||||
return QIcon(QPixmap(svg_img))
|
||||
|
|
Loading…
Reference in a new issue