From ef6e17ab4666d803b8cf1e650ccdf6a8f59a8745 Mon Sep 17 00:00:00 2001 From: Alain Date: Fri, 18 Oct 2024 22:43:24 +0000 Subject: [PATCH] Store Sidebar Position (#249) * save position * check valid --- src/Plug.vala | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Plug.vala b/src/Plug.vala index 03fa6d42..51aec286 100644 --- a/src/Plug.vala +++ b/src/Plug.vala @@ -89,6 +89,12 @@ public class MouseTouchpad.Plug : Switchboard.Plug { end_child = stack, shrink_end_child = false }; + + var sss = SettingsSchemaSource.get_default ().lookup ("io.elementary.settings", true); + if (sss != null && sss.has_key ("sidebar-position")) { + var settings = new Settings ("io.elementary.settings"); + settings.bind ("sidebar-position", hpaned, "position", DEFAULT); + } } return hpaned;