GNOME Bugzilla – Bug 728228
GtkPopover: problems with size request
Last modified: 2017-08-31 19:04:26 UTC
While reviewing bug 725622 - which ports Documents' dropdown widget to GtkPopover - I was confused by the need to set a height request on the popover child. I dug more into the issue, and it seems that in some cases the popover will fail to size itself properly to the child. This doesn't seem the case for children of GtkRevealer, which is the code that Document previously used. Please see the attached reduced testcase - the same GtkTreeView is packed into a GtkPopover and a GtkRevealer. The resulting size request works well for the revealer case, but not for the popover.
Created attachment 274322 [details] testcase Test case. Run it with 'gjs testpopover.js'.
Carlos, can you have a look at this ?
From what I could see, GtkTreeView is updating adjustment boundaries on the idle row validation, but is not queueing resizes, which makes popover stick to the pre-validation widget size. Now the question is whether we badly require treeviews to be children of scrolledwindows or not, I'm attaching a patch for the second case, although it'll definitely involve extra operations for the most normal usecases.
Created attachment 282126 [details] [review] treeview: Queue resizes on row validation This is somewhat confusing if the treeview is embedded with no scrolledwindow in a non-expandable location in the window, since it will stick to the minimum, pre-validation size.
Do we still want this ?
Created attachment 301151 [details] Screencast I am developing a dictionary app that use popover to show list of matched words. I attached a screencast to describe about this bug in my app.
Sorry, i seem to misunderstand the problem. Btw, why do treeview can not auto scroll to selected row?
Sorry again, i found the problem in my codes :(
This seems not to be an issue anymore; here, the Popover gets the right size for the TreeView (once I make the window large enough for it).