Commit Graph

6 Commits

Author SHA1 Message Date
Matthias Clasen
6ab8ab87c8 Reimplement GtkPopover 2019-05-28 20:25:13 +00:00
Timm Bäder
f637006b3e popover: Add a contents node
Remove the special case in gtkwidget.c where we didn't draw any css
background/border for popovers. Instead, rely on themes to not style the
popover node and add a contents gizmo that gets the actual css styling.
We then requeste enough space for the popover to draw both the contents
and the arrow on the side.
2017-07-19 21:27:15 -04:00
Carlos Garnacho
5b8267028d window: Update popover positions on ::size-allocate
Popovers may get relocations optimized away if only x/y changed
in the GtkAllocation. So make sure the toplevel updates popover
positions on all situations.

https://bugzilla.gnome.org/show_bug.cgi?id=729140
2014-08-03 18:37:53 +02:00
Carlos Garnacho
eb0f86d485 popover: Always apply the window shape
In practice this shape is only used to outline the popover when it is
above native windows, in the most normal full-csw case the shape won't apply
visibly, so popovers will still be able to cast a shadow there.

If there are native windows below the popover, the shape will exclude the
shadow, so there are no alpha contents above the window. One worst case that
might happen is that the popover lays above patches of native/client-side
windows, so the shadow could come and go around the border. But first let's
see whether that happens often or visibly enough before adding something more
convoluted.
2014-02-20 16:36:34 +01:00
Matthias Clasen
eb0eaffd24 Trivial coding style cleanups 2014-02-09 00:48:38 -05:00
Carlos Garnacho
2d9c09d6c0 popover: Add private _gtk_popover_set_apply_shape() call
Popovers no longer sets a shape, unless this function is called. This
function exists so widgets that are potentially placed on top of other
native windows can get a popover that's nicely shaped, even if it has
no border shadow around.

https://bugzilla.gnome.org/show_bug.cgi?id=723556
2014-02-04 21:29:25 +01:00