[Commits] [SCM] claws branch, gtk3, updated. 4.0.0-190-gf3e015037

wwp at claws-mail.org wwp at claws-mail.org
Wed Sep 15 11:29:53 CEST 2021


The branch, gtk3 has been updated
       via  f3e0150378312900ca1b05b3c94fdcd22fdfcacc (commit)
      from  cf0d5714de9a48b76ad989e49d96fd8904f7db2c (commit)

Summary of changes:
 src/mimeview.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)


- Log -----------------------------------------------------------------
commit f3e0150378312900ca1b05b3c94fdcd22fdfcacc
Author: wwp <subscript at free.fr>
Date:   Wed Sep 15 11:28:38 2021 +0200

    Fix scrolling in a message's attachments bar (scrolling left or right
    were scrolling down).
    Also fix scrolling not working when GTK smooth scroll is set.

diff --git a/src/mimeview.c b/src/mimeview.c
index 9b2fa0ec1..4b626d633 100644
--- a/src/mimeview.c
+++ b/src/mimeview.c
@@ -1543,8 +1543,20 @@ static gboolean mimeview_scrolled(GtkWidget *widget, GdkEventScroll *event,
 	GtkVScrollbutton *scrollbutton = (GtkVScrollbutton *)mimeview->scrollbutton;
 	if (event->direction == GDK_SCROLL_UP) {
 		scrollbutton->scroll_type = GTK_SCROLL_STEP_BACKWARD;
-	} else {
+	} else if (event->direction == GDK_SCROLL_DOWN) {
 		scrollbutton->scroll_type = GTK_SCROLL_STEP_FORWARD;
+	} else {
+		gdouble x, y;
+
+		if ((event->direction == GDK_SCROLL_SMOOTH) &&
+				gdk_event_get_scroll_deltas(event, &x, &y)) {
+			if (y < 0)
+				scrollbutton->scroll_type = GTK_SCROLL_STEP_BACKWARD;
+			else
+				if (y >0)
+					scrollbutton->scroll_type = GTK_SCROLL_STEP_FORWARD;
+		} else
+			return FALSE; /* Scrolling left or right */
 	}
 	gtk_vscrollbutton_scroll(scrollbutton);
 	return TRUE;

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list