add background image on empty page
This commit is contained in:
parent
ea6ec02f3b
commit
d72c9902d4
16 changed files with 123 additions and 102 deletions
|
|
@ -95,7 +95,19 @@ class View(QtWidgets.QMainWindow, Ui_MainWindow):
|
|||
|
||||
def _apply_icons(self) -> None:
|
||||
# Window
|
||||
self.setWindowIcon(Icons.get(IconName.WARCHRON))
|
||||
self.setWindowIcon(Icons.get(IconName.WARCHRONICO))
|
||||
# Background
|
||||
pixmap = Icons.get(IconName.WARCHRONBACK).pixmap(512, 512)
|
||||
scaled = pixmap.scaled(
|
||||
self.backgroundImage.size(),
|
||||
Qt.AspectRatioMode.KeepAspectRatio,
|
||||
Qt.TransformationMode.SmoothTransformation,
|
||||
)
|
||||
self.backgroundImage.setPixmap(scaled)
|
||||
self.backgroundImage.setParent(self.pageEmpty)
|
||||
self.backgroundImage.setGeometry(self.pageEmpty.rect())
|
||||
self.backgroundImage.lower()
|
||||
self.labelSelect.raise_()
|
||||
# Menu bar
|
||||
self.actionNew.setIcon(Icons.get(IconName.NEW))
|
||||
self.actionOpen.setIcon(Icons.get(IconName.OPEN))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue