summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2026-08-31 15:00:44 -0400
committerVictor Kareh <[email protected]>2026-08-31 15:00:44 -0400
commitd742ee46348c60c0076e67b1057cbf45af2f0117 (patch)
tree94b97c2e092883ed50c089ca4056cba9d2f8ddf3
parente219959f75fb2dc39d72f524581fd050300327d8 (diff)
downloadmate-control-center-mouse-natural-scrolling.tar.bz2
mate-control-center-mouse-natural-scrolling.tar.xz
mouse: add natural scrolling option for micemouse-natural-scrolling
Natural scrolling was only available for touchpads, leaving mice without a way to reverse the scroll direction. This adds an "Enable natural scrolling" toggle to the mouse preferences. The actual scroll direction is applied by mate-settings-daemon, which sets the appropriate libinput or evdev device property. Fixes mate-desktop/mate-desktop#404
-rw-r--r--capplets/mouse/mate-mouse-properties.c4
-rw-r--r--capplets/mouse/mate-mouse-properties.ui25
2 files changed, 29 insertions, 0 deletions
diff --git a/capplets/mouse/mate-mouse-properties.c b/capplets/mouse/mate-mouse-properties.c
index d6cea0b4..15e81292 100644
--- a/capplets/mouse/mate-mouse-properties.c
+++ b/capplets/mouse/mate-mouse-properties.c
@@ -283,6 +283,10 @@ setup_dialog (GtkBuilder *dialog)
g_settings_bind (interface_settings, "gtk-enable-primary-paste", WID ("middle_button_paste_toggle"),
"active", G_SETTINGS_BIND_DEFAULT);
+ /* Natural Scrolling */
+ g_settings_bind (mouse_settings, "natural-scroll", WID ("mouse_natural_scroll_toggle"),
+ "active", G_SETTINGS_BIND_DEFAULT);
+
/* Double-click time */
g_settings_bind (mouse_settings, DOUBLE_CLICK_KEY,
gtk_range_get_adjustment (GTK_RANGE (gtk_builder_get_object (dialog, "delay_scale"))), "value",
diff --git a/capplets/mouse/mate-mouse-properties.ui b/capplets/mouse/mate-mouse-properties.ui
index 875ee501..cf7cffa8 100644
--- a/capplets/mouse/mate-mouse-properties.ui
+++ b/capplets/mouse/mate-mouse-properties.ui
@@ -363,6 +363,31 @@ Author: Wolfgang Ulbrich
<property name="position">3</property>
</packing>
</child>
+ <child>
+ <object class="GtkAlignment" id="alignment21">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="top-padding">6</property>
+ <property name="left-padding">12</property>
+ <child>
+ <object class="GtkCheckButton" id="mouse_natural_scroll_toggle">
+ <property name="label" translatable="yes">Enable _natural scrolling</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>