aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-11-04 15:07:55 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-11-04 15:07:55 +0100
commit4d926cf9a7087df1ef6d40743d17063ebcd4e392 (patch)
treec558edb3cc7269d13aa4acdc9bdaa7ecc6c37a4d
parent80d54d1de44505ca2a0141202dce64b26d2817fd (diff)
parentdaec7e93b5f0f626b83e62b44071e71b29d74be8 (diff)
downloadarctica-greeter-4d926cf9a7087df1ef6d40743d17063ebcd4e392.tar.gz
arctica-greeter-4d926cf9a7087df1ef6d40743d17063ebcd4e392.tar.bz2
arctica-greeter-4d926cf9a7087df1ef6d40743d17063ebcd4e392.zip
Merge branch 'tari01-pr/scroll-direction'
Attributes GH PR #92: https://github.com/ArcticaProject/arctica-greeter/pull/92
-rw-r--r--src/menubar.vala13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/menubar.vala b/src/menubar.vala
index 03d15e1..7b1fb21 100644
--- a/src/menubar.vala
+++ b/src/menubar.vala
@@ -71,7 +71,18 @@ private class IndicatorMenuItem : Gtk.MenuItem
public bool scrolled_cb (Gtk.Widget pWidget, Gdk.EventScroll pEvent)
{
Indicator.Object pObject = pWidget.get_data ("indicator-object");
- GLib.Signal.emit_by_name (pObject, "entry-scrolled", 1, pEvent.direction);
+ int nDirection = 0;
+
+ if (pEvent.direction == Gdk.ScrollDirection.UP)
+ {
+ nDirection = 1;
+ }
+ else if (pEvent.direction == Gdk.ScrollDirection.DOWN)
+ {
+ nDirection = -1;
+ }
+
+ GLib.Signal.emit_by_name (pObject, "entry-scrolled", 1, nDirection);
return false;
}