mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 14:10:30 +00:00
placessidebar: Stop using gtk_widget_get_allocated_width
This commit is contained in:
parent
1a90724de9
commit
5bc5a6f2cd
@ -2378,19 +2378,17 @@ _popover_set_pointing_to_widget (GtkPopover *popover,
|
||||
{
|
||||
GtkWidget *parent;
|
||||
graphene_point_t p;
|
||||
double x, y, w, h;
|
||||
double w, h;
|
||||
|
||||
parent = gtk_widget_get_parent (GTK_WIDGET (popover));
|
||||
|
||||
if (!gtk_widget_compute_point (target, parent, &GRAPHENE_POINT_INIT (0, 0), &p))
|
||||
return;
|
||||
|
||||
x = p.x;
|
||||
y = p.y;
|
||||
w = gtk_widget_get_allocated_width (GTK_WIDGET (target));
|
||||
h = gtk_widget_get_allocated_height (GTK_WIDGET (target));
|
||||
w = gtk_widget_get_width (target);
|
||||
h = gtk_widget_get_height (target);
|
||||
|
||||
gtk_popover_set_pointing_to (popover, &(GdkRectangle){x, y, w, h});
|
||||
gtk_popover_set_pointing_to (popover, &(GdkRectangle){p.x, p.y, w, h});
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user