GNOME Bugzilla – Bug 706024
gtk file chooser dialog stretches out on long file name
Last modified: 2014-01-14 23:09:10 UTC
Created attachment 251650 [details] screenshot of the issue The screen size is not taken into account, while trying to identify the size of the label . Not sure, if this is the ideal solution . from gtk/gtkpathbar.c @@ -1519,7 +1523,7 @@ set_label_size_request (GtkWidget *widg { const gchar *dir_name = get_dir_name (button_data); PangoLayout *layout = gtk_widget_create_pango_layout (button_data->label, dir_name); - gint width, height, bold_width, bold_height; + gint width, height, screen_width, bold_width, bold_height; gchar *markup; pango_layout_get_pixel_size (layout, &width, &height); @@ -1530,8 +1534,10 @@ set_label_size_request (GtkWidget *widg pango_layout_get_pixel_size (layout, &bold_width, &bold_height); + screen_width = gdk_screen_get_width (gtk_widget_get_screen (widget)) * 0.7; + gtk_widget_set_size_request (widget, - MAX (width, bold_width), + MIN (MAX (width, bold_width),screen_width), MAX (height, bold_height)); g_object_unref (layout); }
Which GTK+ version is this about ("Version" field)?
Please see: https://live.gnome.org/GnomeLove/SubmittingPatches for information on how to submit a patch.
The bug is still seen with git head. __self: code path changed by commit 68b34b1bbad9a3940ee0040d264ba4169a98fa26 Author: Matthias Clasen <mclasen@redhat.com> Date: Sat Aug 31 17:20:50 2013 -0400 GtkPathBar: Don't make current dir bold This is closer to the nautilus path bar. https://bugzilla.gnome.org/show_bug.cgi?id=706451
*** This bug has been marked as a duplicate of bug 722211 ***