Reshow wizard dialog with the initial size

issue10648
review363051003
This commit is contained in:
Cédric Krier committed 2021-10-31 10:14:37 +01:00
1 parent 41a8a8ccdc
commit f24d9a02cb
1 file changed
+8 -4
+8 -4
View File
@@ -412,11 +412,15 @@ class WizardDialog(Wizard, NoModal):
width, height = self.default_size()
else:
width, height = -1, -1
self.dia.set_default_size(max(200, width), height)
width, height = self.dia.get_default_size()
if width > 0 and height > 0:
self.dia.resize(*self.dia.get_default_size())
self.dia.set_default_size(width, height)
# reshow with initial size
self.dia.hide()
self.dia.unrealize()
self.dia.show()
width, height = self.dia.get_size()
screen = self.dia.get_screen()
self.dia.resize(
min(width, screen.width()), min(height, screen.height()))
def hide(self):
self.dia.hide()