From 58675c8afc2a0ef177cfc3f5478409402f914912 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Thu, 8 Jan 2026 10:06:11 -0800 Subject: [PATCH 1/6] Add PointingStick view --- po/POTFILES | 1 + src/Plug.vala | 29 ++++------ src/Views/PointingStick.vala | 102 +++++++++++++++++++++++++++++++++++ src/meson.build | 3 +- 4 files changed, 116 insertions(+), 19 deletions(-) create mode 100644 src/Views/PointingStick.vala diff --git a/po/POTFILES b/po/POTFILES index 92619a7c..19b803b1 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -3,5 +3,6 @@ src/Utils/ToucheggSettings.vala src/Views/Clicking.vala src/Views/Gestures.vala src/Views/Mouse.vala +src/Views/PointingStick.vala src/Views/Pointing.vala src/Views/Touchpad.vala diff --git a/src/Plug.vala b/src/Plug.vala index 51aec286..2902dc7c 100644 --- a/src/Plug.vala +++ b/src/Plug.vala @@ -23,6 +23,7 @@ public class MouseTouchpad.Plug : Switchboard.Plug { private ClickingView clicking_view; private MouseView mouse_view; + private PointingStickView pointingstick_view; private PointingView pointing_view; private TouchpadView touchpad_view; private GesturesView gestures_view; @@ -39,6 +40,7 @@ public class MouseTouchpad.Plug : Switchboard.Plug { var settings = new Gee.TreeMap (null, null); settings.set ("input/pointer/clicking", "clicking"); settings.set ("input/pointer/mouse", "mouse"); + settings.set ("input/pointer/pointingstick", "pointingstick"); settings.set ("input/pointer/pointing", "pointing"); settings.set ("input/pointer/touch", "touchpad"); settings.set ("input/pointer/gestures", "gestures"); @@ -64,6 +66,7 @@ public class MouseTouchpad.Plug : Switchboard.Plug { clicking_view = new ClickingView (); mouse_view = new MouseView (); pointing_view = new PointingView (); + pointingstick_view = new PointingStickView (); touchpad_view = new TouchpadView (); stack = new Gtk.Stack (); @@ -76,6 +79,7 @@ public class MouseTouchpad.Plug : Switchboard.Plug { } stack.add_named (mouse_view, "mouse"); + stack.add_named (pointingstick_view, "pointingstick"); stack.add_named (touchpad_view, "touchpad"); var switcher = new Switchboard.SettingsSidebar (stack) { @@ -107,24 +111,7 @@ public class MouseTouchpad.Plug : Switchboard.Plug { } public override void search_callback (string location) { - switch (location) { - case "mouse": - stack.set_visible_child_name ("mouse"); - break; - case "pointing": - stack.set_visible_child_name ("pointing"); - break; - case "touchpad": - stack.set_visible_child_name ("touchpad"); - break; - case "gestures": - stack.set_visible_child_name ("gestures"); - break; - case "clicking": - default: - stack.set_visible_child_name ("clicking"); - break; - } + stack.set_visible_child_name (location); } /* 'search' returns results like ("Keyboard → Behavior → Duration", "keyboardbehavior") */ @@ -145,6 +132,12 @@ public class MouseTouchpad.Plug : Switchboard.Plug { search_results.set ("%s → %s → %s".printf (display_name, _("Mouse"), _("Pointer Acceleration")), "mouse"); search_results.set ("%s → %s → %s".printf (display_name, _("Mouse"), _("Natural Scrolling")), "mouse"); + search_results.set ("%s → %s".printf (display_name, _("Pointing Stick")), "pointingstick"); + search_results.set ("%s → %s".printf (display_name, _("TrackPoint")), "pointingstick"); + search_results.set ("%s → %s → %s".printf (display_name, _("Pointing Stick"), _("Pointer Speed")), "pointingstick"); + search_results.set ("%s → %s → %s".printf (display_name, _("Pointing Stick"), _("Pointer Acceleration")), "pointingstick"); + search_results.set ("%s → %s → %s".printf (display_name, _("Pointing Stick"), _("Scroll Method")), "pointingstick"); + search_results.set ("%s → %s".printf (display_name, _("Pointing")), "pointing"); search_results.set ("%s → %s".printf (display_name, _("Pointer Size")), "pointing"); search_results.set ("%s → %s".printf (display_name, _("Reveal Pointer")), "pointing"); diff --git a/src/Views/PointingStick.vala b/src/Views/PointingStick.vala new file mode 100644 index 00000000..04dbaf2c --- /dev/null +++ b/src/Views/PointingStick.vala @@ -0,0 +1,102 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * SPDX-FileCopyrightText: 2026 elementary, Inc. (https://elementary.io) + */ + +public class MouseTouchpad.PointingStickView : Switchboard.SettingsPage { + public PointingStickView () { + Object ( + header: _("Devices"), + icon: new ThemedIcon ("input-pointingstick"), + title: _("Pointing Stick") + ); + } + + construct { + show_end_title_buttons = true; + + var speed_adjustment = new Gtk.Adjustment (0, -1, 1, 0.1, 0, 0); + + var speed_scale = new Gtk.Scale (HORIZONTAL, speed_adjustment) { + hexpand = true + }; + speed_scale.add_mark (-1, BOTTOM, _("Slower")); + speed_scale.add_mark (0, BOTTOM, null); + speed_scale.add_mark (1, BOTTOM, _("Faster")); + + var speed_header = new Granite.HeaderLabel (_("Pointer Speed")) { + mnemonic_widget = speed_scale + }; + + var accel_profile_default = new Gtk.CheckButton.with_label (_("Hardware default")) { + action_name = "pointingstick.accel-profile", + action_target = new Variant.string ("default") + }; + + var accel_profile_flat = new Gtk.CheckButton.with_label (_("None")) { + action_name = "pointingstick.accel-profile", + action_target = new Variant.string ("flat") + }; + + var accel_profile_adaptive = new Gtk.CheckButton.with_label (_("Adaptive")) { + action_name = "pointingstick.accel-profile", + action_target = new Variant.string ("adaptive") + }; + + var accel_profile_box = new Granite.Box (VERTICAL, HALF) { + accessible_role = LIST + }; + accel_profile_box.append (accel_profile_default); + accel_profile_box.append (accel_profile_flat); + accel_profile_box.append (accel_profile_adaptive); + + var accel_profile_header = new Granite.HeaderLabel (_("Pointer Acceleration")) { + mnemonic_widget = accel_profile_box + }; + + var scroll_method_default = new Gtk.CheckButton.with_label (_("Hardware default")) { + action_name = "pointingstick.scroll-method", + action_target = new Variant.string ("default") + }; + + var scroll_method_none = new Gtk.CheckButton.with_label (_("None")) { + action_name = "pointingstick.scroll-method", + action_target = new Variant.string ("none") + }; + + var scroll_method_buttondown = new Gtk.CheckButton.with_label (_("While the middle button is held down")) { + action_name = "pointingstick.scroll-method", + action_target = new Variant.string ("on-button-down") + }; + + var scroll_method_box = new Granite.Box (VERTICAL, HALF) { + accessible_role = LIST + }; + scroll_method_box.append (scroll_method_default); + scroll_method_box.append (scroll_method_none); + scroll_method_box.append (scroll_method_buttondown); + + var scrolling_header = new Granite.HeaderLabel (_("Scroll Method")) { + mnemonic_widget = scroll_method_box + }; + + var content_box = new Granite.Box (VERTICAL, HALF); + content_box.append (speed_header); + content_box.append (speed_scale); + content_box.append (accel_profile_header); + content_box.append (accel_profile_box); + content_box.append (scrolling_header); + content_box.append (scroll_method_box); + + child = content_box; + + var settings = new GLib.Settings ("org.gnome.desktop.peripherals.pointingstick"); + settings.bind ("speed", speed_adjustment, "value", DEFAULT); + + var action_group = new SimpleActionGroup (); + action_group.add_action (settings.create_action ("accel-profile")); + action_group.add_action (settings.create_action ("scroll-method")); + + insert_action_group ("pointingstick", action_group); + } +} diff --git a/src/meson.build b/src/meson.build index 726a5637..c7e64731 100644 --- a/src/meson.build +++ b/src/meson.build @@ -2,6 +2,7 @@ plug_files = files( 'Plug.vala', 'Views/Clicking.vala', 'Views/Mouse.vala', + 'Views/PointingStick.vala', 'Views/Pointing.vala', 'Views/Touchpad.vala', 'Views/Gestures.vala', @@ -20,7 +21,7 @@ shared_module( dependency('glib-2.0'), dependency('gio-2.0'), dependency('gobject-2.0'), - dependency('granite-7', version: '>=7.4.0'), + dependency('granite-7', version: '>=7.6.0'), dependency('gtk4'), dependency('libxml-2.0'), switchboard_dep From c6d7724e5207f834d9fdfa291c5d5f0fd1241f9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Tue, 13 Jan 2026 12:33:51 -0800 Subject: [PATCH 2/6] Add icons --- data/mouse-touchpad.gresource.xml | 4 ++ data/pointingstick/32.svg | 81 +++++++++++++++++++++++++++++++ data/pointingstick/48.svg | 65 +++++++++++++++++++++++++ src/Views/PointingStick.vala | 2 +- 4 files changed, 151 insertions(+), 1 deletion(-) create mode 100644 data/pointingstick/32.svg create mode 100644 data/pointingstick/48.svg diff --git a/data/mouse-touchpad.gresource.xml b/data/mouse-touchpad.gresource.xml index 627bc826..9d202b8b 100644 --- a/data/mouse-touchpad.gresource.xml +++ b/data/mouse-touchpad.gresource.xml @@ -25,5 +25,9 @@ gestures/32.svg gestures/48.svg gestures/48.svg + pointingstick/32.svg + pointingstick/32.svg + pointingstick/48.svg + pointingstick/48.svg diff --git a/data/pointingstick/32.svg b/data/pointingstick/32.svg new file mode 100644 index 00000000..a42d8315 --- /dev/null +++ b/data/pointingstick/32.svg @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/pointingstick/48.svg b/data/pointingstick/48.svg new file mode 100644 index 00000000..321e3b7d --- /dev/null +++ b/data/pointingstick/48.svg @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Views/PointingStick.vala b/src/Views/PointingStick.vala index 04dbaf2c..d51f4b32 100644 --- a/src/Views/PointingStick.vala +++ b/src/Views/PointingStick.vala @@ -7,7 +7,7 @@ public class MouseTouchpad.PointingStickView : Switchboard.SettingsPage { public PointingStickView () { Object ( header: _("Devices"), - icon: new ThemedIcon ("input-pointingstick"), + icon: new ThemedIcon ("mouse-touchpad-pointingstick"), title: _("Pointing Stick") ); } From 0f998ad5e9230adf63e5d6d73fa7f5df03ed5ed3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Tue, 13 Jan 2026 12:35:59 -0800 Subject: [PATCH 3/6] fix gradient on 32 --- data/pointingstick/32.svg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/pointingstick/32.svg b/data/pointingstick/32.svg index a42d8315..5c687c9c 100644 --- a/data/pointingstick/32.svg +++ b/data/pointingstick/32.svg @@ -1,5 +1,5 @@ - + @@ -30,7 +30,7 @@ - + From 0c73aff434d1f74fadc579824f8253c3e69ca5aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Wed, 14 Jan 2026 09:13:43 -0800 Subject: [PATCH 4/6] more detail --- data/pointingstick/32.svg | 652 +++++++++++++++++++++++++++++++++----- 1 file changed, 571 insertions(+), 81 deletions(-) diff --git a/data/pointingstick/32.svg b/data/pointingstick/32.svg index 5c687c9c..7141eff3 100644 --- a/data/pointingstick/32.svg +++ b/data/pointingstick/32.svg @@ -1,81 +1,571 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +image/svg+xml From 785d319d37e3e3619e96701e00f04d38270a58f7 Mon Sep 17 00:00:00 2001 From: William Kelso Date: Tue, 20 Jan 2026 12:10:03 -0500 Subject: [PATCH 5/6] Extend new design to 48px (#266) * use new design for 48px * fix circle details --- data/pointingstick/48.svg | 793 ++++++++++++++++++++++++++++++++++---- 1 file changed, 728 insertions(+), 65 deletions(-) diff --git a/data/pointingstick/48.svg b/data/pointingstick/48.svg index 321e3b7d..a44bf4ae 100644 --- a/data/pointingstick/48.svg +++ b/data/pointingstick/48.svg @@ -1,65 +1,728 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - + +image/svg+xml From 6c6ffbf21268d763e0daa89218711273e7cf3c26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Tue, 20 Jan 2026 09:32:33 -0800 Subject: [PATCH 6/6] Adjust details in 48 --- data/pointingstick/48.svg | 730 +------------------------------------- 1 file changed, 2 insertions(+), 728 deletions(-) diff --git a/data/pointingstick/48.svg b/data/pointingstick/48.svg index a44bf4ae..aa08bfd8 100644 --- a/data/pointingstick/48.svg +++ b/data/pointingstick/48.svg @@ -1,728 +1,2 @@ - -image/svg+xml + +image/svg+xml