From 0ad061129d528077c893f06f74f1abf00b856f72 Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Sun, 19 Jan 2020 12:42:18 -0300 Subject: [PATCH] [fix][about] icons scaling --- CHANGELOG.md | 1 + bauh/view/qt/about.py | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93ac4595..2a30af52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - AUR: - not treating **makedepends' as a list during dependency checking ( **anbox-git** installation was crashing ) - not considering the package name itself as *provided** during dependency checking ( **anbox-git** installation was crashing ) +- **About** window icons scaling ## [0.8.1] 2020-01-14 ### Features: diff --git a/bauh/view/qt/about.py b/bauh/view/qt/about.py index abc2e3c1..34ecede1 100644 --- a/bauh/view/qt/about.py +++ b/bauh/view/qt/about.py @@ -1,7 +1,7 @@ from glob import glob -from PyQt5.QtCore import Qt -from PyQt5.QtGui import QPixmap +from PyQt5.QtCore import Qt, QSize +from PyQt5.QtGui import QPixmap, QIcon from PyQt5.QtWidgets import QVBoxLayout, QDialog, QLabel, QWidget, QHBoxLayout from bauh import __version__, __app_name__, ROOT_DIR @@ -55,8 +55,8 @@ class AboutDialog(QDialog): gems_widget.layout().addWidget(QLabel()) for gem_path in available_gems: icon = QLabel() - pxmap = QPixmap(gem_path + '/resources/img/{}.svg'.format(gem_path.split('/')[-1])) - icon.setPixmap(pxmap.scaled(24, 24, Qt.KeepAspectRatio, Qt.SmoothTransformation)) + icon_path = gem_path + '/resources/img/{}.svg'.format(gem_path.split('/')[-1]) + icon.setPixmap(QIcon(icon_path).pixmap(QSize(24, 24))) gems_widget.layout().addWidget(icon) gems_widget.layout().addWidget(QLabel())