diff --git a/sao/src/sao.less b/sao/src/sao.less index 6867baff8e..ef4a162106 100644 --- a/sao/src/sao.less +++ b/sao/src/sao.less @@ -640,7 +640,9 @@ img.icon { } } .form-label { - white-space: pre; + white-space: pre-wrap; + width: max-content; + max-width: 80ch; } .form-char, .form-password, .form-integer, .form-float, .form-date, .form-datetime, .form-time, .form-timedelta, .form-selection, diff --git a/tryton/tryton/gui/window/view_form/view/form_gtk/state_widget.py b/tryton/tryton/gui/window/view_form/view/form_gtk/state_widget.py index b4a5b57a8f..0df55668a7 100644 --- a/tryton/tryton/gui/window/view_form/view/form_gtk/state_widget.py +++ b/tryton/tryton/gui/window/view_form/view/form_gtk/state_widget.py @@ -50,6 +50,8 @@ class Label(StateMixin, Gtk.Label): readonly = ((field and field.attrs.get('readonly')) or state_changes.get('readonly', not bool(field))) common.apply_label_attributes(self, readonly, required) + self.set_max_width_chars(80) + self.set_line_wrap(True) class VBox(StateMixin, Gtk.VBox):