Pamhyr2: Add new logo.

This commit is contained in:
Pierre-Antoine Rouby committed 2024-03-27 16:14:52 +01:00
1 parent e350b7d8f5
commit 48e010f195
5 files changed
+33 -8

No files matched your search

+9 -6
View File
@@ -496,12 +496,7 @@ class ASubMainWindow(QMainWindow, ASubWindowFeatures, WindowToolKit):
super(ASubMainWindow, self).__init__(parent=parent)
if ui is not None:
self.ui = loadUi(
os.path.abspath(
os.path.join(
os.path.dirname(__file__),
"..", "ui", f"{ui}.ui"
)
),
os.path.join(self._get_ui_directory(), f"{ui}.ui"),
self
)
@@ -510,6 +505,14 @@ class ASubMainWindow(QMainWindow, ASubWindowFeatures, WindowToolKit):
if self.parent is not None:
self.parent.sub_win_add(name, self)
def _get_ui_directory(self):
return os.path.abspath(
os.path.join(
os.path.dirname(__file__),
"..", "ui"
)
)
def closeEvent(self, event):
if self.parent is not None:
self.parent.sub_win_del(self.hash())