GNOME Bugzilla – Bug 650929
[GtkInfobar] text is not force-wrapped when space is constrained
Last modified: 2018-04-15 00:08:59 UTC
Created attachment 188428 [details] screenshot - infobar with contents that are NOT long enough to wrap Pitivi uses a bunch of gtk infobars... problem is that when the text is not long enough, it doesn't wrap, and the infobars somehow force the width of pitivi's window to be wider than 1024px and break maximization. Shouldn't those text labels be forced to wrap when space is constrained?
Created attachment 188429 [details] screenshot - infobar with contents that are long enough to wrap In this screenshot, the text string was long enough to trigger the infobar's wrapping feature, and thus the window was able to fit in 1024 pixels wide.
Note that the first screenshot is the case where the text string is *NOT* long enough, causing text wrapping to not be triggered, and thus the bug to occur.
With code like this: GtkLabel *label; label = GTK_LABEL (gtk_label_new (NULL)); gtk_widget_set_halign (GTK_WIDGET (label), GTK_ALIGN_START); gtk_label_set_line_wrap (label, TRUE); gtk_label_set_line_wrap_mode (label, PANGO_WRAP_WORD_CHAR); It works fine. It is up to the application to setup the GtkLabel correctly. GtkInfoBar accepts any GtkWidget in its content_area. So I think it was either a GTK+ bug that is now fixed, or it is a Pitivi bug.
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
As announced a while ago, we are migrating to gitlab, and bugs that haven't seen activity in the last year or so will be not be migrated, but closed out in bugzilla. If this bug is still relevant to you, you can open a new issue describing the symptoms and how to reproduce it with gtk 3.22.x or master in gitlab: https://gitlab.gnome.org/GNOME/gtk/issues/new