carousel: Use revealer to calculate arrow offset

Now that the inner GtkStack has margins, it has an odd offset from
what we would expect. A better widget to use is the GtkRevealer,
which must cover the entire allocation, and therefore will always
produce the expected x offset.
This commit is contained in:
Georges Basile Stavracas Neto 2022-07-12 17:49:49 -03:00
parent 4887ded149
commit 15172723dd
1 changed files with 1 additions and 1 deletions

View File

@ -105,7 +105,7 @@ mct_carousel_item_get_x (MctCarouselItem *item,
gint width;
gdouble dest_x;
parent = GTK_WIDGET (carousel->stack);
parent = GTK_WIDGET (carousel->revealer);
widget = GTK_WIDGET (item);
width = gtk_widget_get_allocated_width (widget);