forked from awendt/pyrelacs
[icons] revert back to the qt resource system for icons
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user