mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
change default size of window based on center widget
This commit is contained in:
parent
6e21bc4779
commit
c02f90d5d3
1 changed files with 6 additions and 2 deletions
|
|
@ -343,11 +343,15 @@ class DetailsPopup(QtWidgets.QDialog):
|
|||
|
||||
def showEvent(self, event):
|
||||
layout = self.layout()
|
||||
cw_size = self._center_widget.size()
|
||||
layout.insertWidget(0, self._center_widget)
|
||||
super().showEvent(event)
|
||||
if self._first_show:
|
||||
self._first_show = False
|
||||
self.resize(700, 400)
|
||||
self.resize(
|
||||
max(cw_size.width(), 700),
|
||||
max(cw_size.height(), 400)
|
||||
)
|
||||
super().showEvent(event)
|
||||
|
||||
def closeEvent(self, event):
|
||||
super().closeEvent(event)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue