GNOME Bugzilla – Bug 767851
Adwaita: popover arrows broken in some orientations
Last modified: 2016-06-21 15:58:35 UTC
Created attachment 330036 [details]
the arrow came off
Created attachment 330123 [details] [review]
GtkPopover: Honor widget margins when calculating tail position
If there are widget margins set, the whole popover will be displaced.
However the calculation of the tail position doesn't have this into
account, ending up with the tail being detached from the popover if
the margin grew too big.
We should not render the arrows invariably next to the GdkWindow edge,
but optionally displaced inside it depending on the widget margins.
Fixes the gtk3-demo "Popovers" demo case, whose GtkEntry popovers set
widget margins for some reason.
Created attachment 330124 [details] [review]
demos: Simplify popovers demo
Don't do much unconventional stuff here. This is a demo, not a test.
This turned out to be a glitch between popovers and widget margin-* properties. Those don't make a lot of sense together, I've however fixed the behavior in the first patch. It's still dubious gtk3-demo should be doing that, so in the second patch I sanitize the demo a bit.
Review of attachment 330123 [details] [review]:
Looks easy enough
Review of attachment 330124 [details] [review]:
Attachment 330123 [details] pushed as ed227f9 - GtkPopover: Honor widget margins when calculating tail position
Attachment 330124 [details] pushed as 3b98a2d - demos: Simplify popovers demo