changeset 8fda9d49fb4e in tryton:default
details: https://hg.tryton.org/tryton?cmd=changeset&node=8fda9d49fb4e
description:
Reshow wizard dialog with the initial size
issue10648
review363051003
diffstat:
tryton/gui/window/wizard.py | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diffs (23 lines):
diff -r 157c0979a1ad -r 8fda9d49fb4e tryton/gui/window/wizard.py
--- a/tryton/gui/window/wizard.py Sat Oct 30 11:32:05 2021 +0200
+++ b/tryton/gui/window/wizard.py Sun Oct 31 10:14:37 2021 +0100
@@ -412,11 +412,15 @@
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()