set stylesheet on first show

This commit is contained in:
iLLiCiTiT 2021-10-21 12:40:33 +02:00
parent 7cedb5af31
commit a2397f48f0
2 changed files with 24 additions and 14 deletions

View file

@ -193,7 +193,7 @@ class LoaderWindow(QtWidgets.QDialog):
main_splitter.setSizes([250, 850, 200])
self.resize(1300, 700)
self.setStyleSheet(style.load_stylesheet())
self._first_show = True
def resizeEvent(self, event):
super(LoaderWindow, self).resizeEvent(event)
@ -203,6 +203,12 @@ class LoaderWindow(QtWidgets.QDialog):
super(LoaderWindow, self).moveEvent(event)
self._overlay_frame.move(0, 0)
def showEvent(self, event):
super(LoaderWindow, self).showEvent(event)
if self._first_show:
self._first_show = False
self.setStyleSheet(style.load_stylesheet())
# -------------------------------
# Delay calling blocking methods
# -------------------------------