From e6dce5a40b346299851d68bb5c295d062d9f86b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 6 Aug 2021 09:52:18 +0200 Subject: [PATCH] Use width attribute for default width of number widgets issue10609 review346691002 --- tryton/gui/window/view_form/view/form_gtk/float.py | 2 +- tryton/gui/window/view_form/view/form_gtk/integer.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tryton/gui/window/view_form/view/form_gtk/float.py b/tryton/gui/window/view_form/view/form_gtk/float.py index 5fb1e7bc09..f709518826 100644 --- a/tryton/gui/window/view_form/view/form_gtk/float.py +++ b/tryton/gui/window/view_form/view/form_gtk/float.py @@ -17,7 +17,7 @@ class Float(Integer): if digits: return sum(digits) else: - return 18 + return self.attrs.get('width', 18) def display(self): digits = self.digits diff --git a/tryton/gui/window/view_form/view/form_gtk/integer.py b/tryton/gui/window/view_form/view/form_gtk/integer.py index 80269a953c..add0f59de8 100644 --- a/tryton/gui/window/view_form/view/form_gtk/integer.py +++ b/tryton/gui/window/view_form/view/form_gtk/integer.py @@ -53,7 +53,7 @@ class Integer(Widget): @property def width(self): - return 8 + return self.attrs.get('width', 8) def display(self): def set_symbol(entry, text):