Skip to content

Commit 62b1a15

Browse files
committed
[Gtk] Enable word wrapping for messageBox text/body
1 parent 6ae0434 commit 62b1a15

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

gtk/src/Utils.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ Utils::Button::Type Utils::messageBox(Gtk::MessageType type,
9494

9595

9696
Gtk::Label label(text);
97+
label.set_line_wrap(true);
98+
label.set_max_width_chars(80);
9799
label.set_xalign(0);
98100
grid.attach(label, 1, 0);
99101
grid.set_column_spacing(6);
@@ -110,6 +112,7 @@ Utils::Button::Type Utils::messageBox(Gtk::MessageType type,
110112
if (!body.empty()) {
111113
textView.set_editable(false);
112114
textView.set_cursor_visible(false);
115+
textView.set_wrap_mode(Gtk::WRAP_WORD);
113116
Glib::RefPtr<Gtk::TextBuffer> buffer = Gtk::TextBuffer::create();
114117
buffer->set_text(body);
115118
textView.set_buffer(buffer);

0 commit comments

Comments
 (0)