set style and resize on first show

This commit is contained in:
iLLiCiTiT 2021-10-29 18:49:51 +02:00
parent 9552b41bc4
commit a88485ef18

View file

@ -130,6 +130,8 @@ class ContextDialog(QtWidgets.QDialog):
self._set_context_project = None
self._set_context_asset = None
self._first_show = True
# Output of dialog
self._context_to_store = {
"project": None,
@ -141,6 +143,13 @@ class ContextDialog(QtWidgets.QDialog):
self._strict = strict
self._validate_strict()
def showEvent(self, event):
super(ContextDialog, self).showEvent(event)
if self._first_show:
self._first_show = False
self.setStyleSheet(style.load_stylesheet())
self.resize(600, 700)
def _on_asset_refresh_timer(self):
self._assets_widget.refresh()