After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 767851 - Adwaita: popover arrows broken in some orientations
Adwaita: popover arrows broken in some orientations
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkPopover
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2016-06-20 03:10 UTC by Matthias Clasen
Modified: 2016-06-21 15:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
the arrow came off (184.90 KB, image/png)
2016-06-20 03:10 UTC, Matthias Clasen
  Details
GtkPopover: Honor widget margins when calculating tail position (3.87 KB, patch)
2016-06-21 10:33 UTC, Carlos Garnacho
committed Details | Review
demos: Simplify popovers demo (981 bytes, patch)
2016-06-21 10:33 UTC, Carlos Garnacho
committed Details | Review

Description Matthias Clasen 2016-06-20 03:10:47 UTC
Created attachment 330036 [details]
the arrow came off

Screenshot attached
Comment 1 Carlos Garnacho 2016-06-21 10:33:12 UTC
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.
Comment 2 Carlos Garnacho 2016-06-21 10:33:18 UTC
Created attachment 330124 [details] [review]
demos: Simplify popovers demo

Don't do much unconventional stuff here. This is a demo, not a test.
Comment 3 Carlos Garnacho 2016-06-21 10:36:21 UTC
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.
Comment 4 Matthias Clasen 2016-06-21 15:15:25 UTC
Review of attachment 330123 [details] [review]:

Looks easy enough
Comment 5 Matthias Clasen 2016-06-21 15:15:59 UTC
Review of attachment 330124 [details] [review]:

sure
Comment 6 Carlos Garnacho 2016-06-21 15:58:25 UTC
Attachment 330123 [details] pushed as ed227f9 - GtkPopover: Honor widget margins when calculating tail position
Attachment 330124 [details] pushed as 3b98a2d - demos: Simplify popovers demo