2
0
forked from awendt/pyrelacs

[icons] revert back to the qt resource system for icons

This commit is contained in:
2024-09-30 10:03:29 +02:00
parent 09dd7f3d51
commit b0897bf52d
3 changed files with 6 additions and 9 deletions

View File

@@ -1,5 +1,3 @@
import pathlib
from PyQt6.QtGui import QPixmap
from PyQt6.QtWidgets import QDialog, QDialogButtonBox, QLabel, QVBoxLayout, QWidget
from PyQt6.QtCore import Qt
@@ -40,8 +38,7 @@ class About(QWidget):
rtd_link.setAlignment(Qt.AlignmentFlag.AlignCenter)
iconlabel = QLabel()
_root = pathlib.Path(__file__).parent.parent
pixmap = QPixmap(str(pathlib.Path.joinpath(_root, "icons/relacstuxheader.png")))
pixmap = QPixmap(":/icons/relacstuxheader.png")
s = pixmap.size()
new_height = int(s.height() * 300/s.width())
pixmap = pixmap.scaled(300, new_height, Qt.AspectRatioMode.KeepAspectRatio, Qt.TransformationMode.FastTransformation)