From 15172723ddbd203d6c85f02fdfbc02ddadbec43a Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Tue, 12 Jul 2022 17:49:49 -0300 Subject: [PATCH] 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. --- malcontent-control/carousel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/malcontent-control/carousel.c b/malcontent-control/carousel.c index e80d9d4..1fdd012 100644 --- a/malcontent-control/carousel.c +++ b/malcontent-control/carousel.c @@ -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);