GNOME Bugzilla – Bug 770388
GtkTreeView: attempt to underallocate GtkTreeView's child GtkButton
Last modified: 2018-04-15 00:07:51 UTC
I get lots of warnings with gtk+ master. The warning can be reproduced using gtk3-demo: $ gtk3-demo --run=tree_store (gtk3-demo:6100): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to underallocate GtkButton's child GtkBox 0x1d59430. Allocation is 37x24, but minimum required size is 41x14. (gtk3-demo:6100): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to underallocate GtkTreeView's child GtkButton 0x1bc0340. Allocation is 50x25, but minimum required size is 55x25. (gtk3-demo:6100): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to underallocate GtkTreeView's child GtkButton 0x1dbd180. Allocation is 50x25, but minimum required size is 54x25.
They are too many of these in many gtk apps. Is there a way to disable them for now ?
The warning in gtk3-demo --run=tree_store were caused by fixed column widths. I've fixed that now.
My application uses fixed column widths. This was just meant as a way to reproduce.
Can this warning be disabled for the stable release? Getting multiple pages of warnings on each redraw is annoying.
Created attachment 336207 [details] [review] treeview: Don't underallocate drag button
Created attachment 336208 [details] [review] treeviewcolumn: don't underallocate column headers
Can you apply those patches and still reproduce? They are just fixing some obvious problems. I usually don't do treeviews.
Thanks. With both patches applied the warning is gone. But the right hand side borders of the columns are gone now when the label widget is truncated.
Yeah, dunno what to do about that, the borders are drawn by the button and that just has a minimum size... unless we set the minimum width of the column to that of the button of course, but I guess that's not an option.
I guess the border could be drawn by the next column? I just noticed that the above patches break things in RTL mode
Created attachment 336324 [details] [review] widget: Don't print underallocation warnings by default See similar changes: https://git.gnome.org/browse/gtk+/commit/?id=1b15588732f2c4e3c59994a59613d4e5c963e283 https://git.gnome.org/browse/gtk+/commit/?id=54fdcb3ffac3383432b379f3e16e8cb0086b8101
Comment on attachment 336324 [details] [review] widget: Don't print underallocation warnings by default Attachment 336324 [details] pushed as ae8ffc7 - widget: Don't print underallocation warnings by default
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.
*** Bug 765596 has been marked as a duplicate of this bug. ***
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