Support width/height attribute on notebook

issue7432
review50351002
This commit is contained in:
Cédric Krier committed 2018-05-29 10:33:18 +02:00
1 parent 65ac46af9b
commit f524a95769
1 file changed
+4
+4
View File
@@ -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