From f524a9576923ef7bf935ef56d69af2b01cba607d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 29 May 2018 10:33:18 +0200 Subject: [PATCH] Support width/height attribute on notebook issue7432 review50351002 --- tryton/gui/window/view_form/view/form.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tryton/gui/window/view_form/view/form.py b/tryton/gui/window/view_form/view/form.py index fd8e70e2f7..1b3c5132c2 100644 --- a/tryton/gui/window/view_form/view/form.py +++ b/tryton/gui/window/view_form/view/form.py @@ -285,6 +285,10 @@ class ViewForm(View): notebook = Notebook(attrs=attributes) notebook.set_scrollable(True) notebook.set_border_width(3) + if attributes.get('height') or attributes.get('width'): + notebook.set_size_request( + int(attributes.get('width', -1)), + int(attributes.get('height', -1))) # Force to display the first time it switches on a page # This avoids glitch in position of widgets