summaryrefslogtreecommitdiff
path: root/fixes__labels-wrapping.patch
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2021-08-18 15:24:42 -0400
committerB. Stack <bgstack15@gmail.com>2021-08-18 15:24:42 -0400
commit76447c4a5b6c31f9aec0834353e017eeae77f9c4 (patch)
treeec9b6ee857805269eae8a63ea89acf3e1bf3a21f /fixes__labels-wrapping.patch
parentUpdate to 3.24.29 (diff)
downloadgtk3-classic-build-gtk3-76447c4a5b6c31f9aec0834353e017eeae77f9c4.tar.gz
gtk3-classic-build-gtk3-76447c4a5b6c31f9aec0834353e017eeae77f9c4.tar.bz2
gtk3-classic-build-gtk3-76447c4a5b6c31f9aec0834353e017eeae77f9c4.zip
3.24.29 for fc33
Diffstat (limited to 'fixes__labels-wrapping.patch')
-rw-r--r--fixes__labels-wrapping.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/fixes__labels-wrapping.patch b/fixes__labels-wrapping.patch
new file mode 100644
index 0000000..3f8d734
--- /dev/null
+++ b/fixes__labels-wrapping.patch
@@ -0,0 +1,19 @@
+Index: b/gtk/gtklabel.c
+===================================================================
+--- a/gtk/gtklabel.c
++++ b/gtk/gtklabel.c
+@@ -3685,6 +3685,14 @@ gtk_label_get_preferred_layout_size (Gtk
+ GtkLabelPrivate *priv = label->priv;
+ PangoLayout *layout;
+ gint char_pixels;
++ GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (label));
++ if (GTK_IS_WINDOW (toplevel))
++ {
++ gint default_window_width;
++ gtk_window_get_default_size (GTK_WINDOW (toplevel), &default_window_width, NULL);
++ if (default_window_width == -1 && priv->max_width_chars == -1 && priv->ellipsize == PANGO_ELLIPSIZE_NONE)
++ priv->max_width_chars = 56;
++ }
+
+ /* "width-chars" Hard-coded minimum width:
+ * - minimum size should be MAX (width-chars, strlen ("..."));
bgstack15