mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
popover: Stop using gtk_widget_get_content_size
This commit is contained in:
parent
7cc9bee7a2
commit
dbc4796d6a
@ -1215,16 +1215,14 @@ gtk_popover_snapshot (GtkWidget *widget,
|
||||
GtkBorder border;
|
||||
graphene_rect_t bounds;
|
||||
cairo_t *cr;
|
||||
int width, height;
|
||||
|
||||
/* Draw the child first so we can draw the arrow (partially) over it */
|
||||
gtk_widget_snapshot_child (widget, priv->contents_widget, snapshot);
|
||||
|
||||
gtk_widget_get_content_size (widget, &width, &height);
|
||||
|
||||
graphene_rect_init (&bounds,
|
||||
0, 0,
|
||||
width, height);
|
||||
gtk_widget_get_width (widget),
|
||||
gtk_widget_get_height (widget));
|
||||
cr = gtk_snapshot_append_cairo (snapshot,
|
||||
&bounds,
|
||||
"Popover");
|
||||
@ -1243,7 +1241,8 @@ gtk_popover_snapshot (GtkWidget *widget,
|
||||
/* Render the arrow background */
|
||||
gtk_render_background (context, cr,
|
||||
0, 0,
|
||||
width, height);
|
||||
gtk_widget_get_width (widget),
|
||||
gtk_widget_get_height (widget));
|
||||
|
||||
/* Render the border of the arrow tip */
|
||||
if (border.bottom > 0)
|
||||
|
Loading…
Reference in New Issue
Block a user