[gnome-software/wip/wjt/disable-scroll-wheel-on-featured-carousel] gs-featured-carousel: Disable scroll by mouse wheel on the HdyCarousel
- From: Will Thompson <wjt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/wjt/disable-scroll-wheel-on-featured-carousel] gs-featured-carousel: Disable scroll by mouse wheel on the HdyCarousel
- Date: Wed, 16 Feb 2022 14:45:15 +0000 (UTC)
commit 7dfa3f8f0387e4f6c392816a4ab48ce2017994b2
Author: Milan Crha <mcrha redhat com>
Date: Mon Jan 3 15:09:15 2022 +0100
gs-featured-carousel: Disable scroll by mouse wheel on the HdyCarousel
To scroll the page, not the carousel.
Backport of abed6fef318fb16f9b11c05f89a3b31886ac58a6 to gnome-41 branch.
Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1592
src/gs-featured-carousel.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/src/gs-featured-carousel.c b/src/gs-featured-carousel.c
index f1de11e83..2e893fc2a 100644
--- a/src/gs-featured-carousel.c
+++ b/src/gs-featured-carousel.c
@@ -192,6 +192,12 @@ gs_featured_carousel_init (GsFeaturedCarousel *self)
gtk_widget_set_has_window (GTK_WIDGET (self), FALSE);
gtk_widget_init_template (GTK_WIDGET (self));
+#if HDY_CHECK_VERSION(1, 3, 0)
+ /* Disable scrolling through the carousel, as it’s typically used
+ * in category pages which are themselves scrollable. */
+ hdy_carousel_set_allow_scroll_wheel (HDY_CAROUSEL (self->carousel), FALSE);
+#endif
+
/* Ensure the text directions are up to date */
next_button_direction_changed_cb (GTK_WIDGET (self->next_button_image), GTK_TEXT_DIR_NONE, self);
previous_button_direction_changed_cb (GTK_WIDGET (self->previous_button_image), GTK_TEXT_DIR_NONE,
self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]