Commit c44df5b0 authored by Matthias Clasen's avatar Matthias Clasen
Browse files

Do multiline labels differently

I think we should show multiple lines of text when it is
present. Cutting things off is just rude. But we don't
want to break the UI by producing an enormous dialog,
so don't allow more than 10 lines per label.

https://bugzilla.gnome.org/show_bug.cgi?id=787759
parent 3b35b8a4
......@@ -175,11 +175,12 @@ add_row (GtkWidget *grid,
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
gtk_label_set_max_width_chars (GTK_LABEL (label), 64);
if (multiline && g_utf8_strlen (value, -1) > 64) {
gtk_label_set_width_chars (GTK_LABEL (label), 64);
gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
gtk_label_set_width_chars (GTK_LABEL (label), 64);
}
gtk_label_set_max_width_chars (GTK_LABEL (label), 64);
gtk_label_set_lines (GTK_LABEL (label), multiline ? 10 : 1);
gtk_grid_attach_next_to (GTK_GRID (grid), label,
name_w, GTK_POS_RIGHT,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment