Scrolled TreeView and size allocation warnings

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Scrolled TreeView and size allocation warnings

Dino Aljević
Hello,

I recently posted a question on stackoverflow.com regarding GTK Warnings I
recieve when running my application.

You can read full question here on this link
<https://stackoverflow.com/questions/46253472/allocating-size-to-gtk-warning-when-using-gtk-treeview-inside-gtk-scrolledw>,
but in short, I am developing an application in GTK3 using PyGObject, and
the issue I'm having is with TreeView and ScrolledWindow widgets.

I have TreeView widget inside ScrolledWindow which is inside a main grid,
and whenever there are enough items in the TreeView for the scroll bar to
appear, I get spammed with the following warnings:

Gtk-WARNING **: Allocating size to __main__+MCVEWindow 0000000004e93b30
without calling gtk_widget_get_preferred_width/height(). How does the code
know the size to allocate?

MCVEWindow is an ApplicationWindow widget which contains aforementioned
main grid.

The warnings also appear whenever I expand all TreeView items leading me to
believe it may be a layout/resizing issue.

From what we gathered so far, the issue is not reproducible in GTK version
3.18, but it is reproducible in versions 3.22.18 and 3.22.21. I also don't
think it's a bug in my code, but rather in GTK itself although I'm new to
GTK so I'm not quite sure.

Python code is in the linked StackOverflow question, you should be able to
copy&paste and run it, and a user on StackOverflow was kind enough to
translate my code into C version
<https://gist.github.com/mywtfmp3/bf17df5a3d13c889acd673740c9c2898>, which
he tested on version 3.22.21.

I was wondering if someone can point out the issue or confirm it's in fact
a GTK bug, and if it is, where to report it.

Thank you in advance,
Dino

<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
_______________________________________________
gtk-app-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list