Wrap long label to 80 chars

Closes #12618
This commit is contained in:
Cédric Krier
2023-10-05 18:29:20 +02:00
parent 4556b58e57
commit 6ea6082b78
2 changed files with 5 additions and 1 deletions
+3 -1
View File
@@ -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,
@@ -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):