refactor(settings): remove redundant right-click option from control center

This commit is contained in:
tibssy
2026-03-03 02:43:10 +00:00
parent 646d4e6338
commit ef166d8ea7
6 changed files with 26 additions and 21 deletions
+22
View File
@@ -0,0 +1,22 @@
import QtQuick
QtObject {
id: root
function migrate(adapter, logger, rawJson) {
logger.i("Settings", "Migrating settings to v55");
// Check if the old setting exists
if (rawJson.controlCenter && rawJson.controlCenter.openAtMouseOnBarRightClick !== undefined) {
if (!rawJson.bar) rawJson.bar = {};
rawJson.bar.rightClickFollowMouse = rawJson.controlCenter.openAtMouseOnBarRightClick;
delete rawJson.controlCenter.openAtMouseOnBarRightClick;
logger.i("Settings", "Successfully moved openAtMouseOnBarRightClick to bar.rightClickFollowMouse");
}
return true;
}
}
+3 -1
View File
@@ -26,7 +26,8 @@ QtObject {
49: migration49Component,
50: migration50Component,
53: migration53Component,
54: migration54Component
54: migration54Component,
55: migration55Component
})
// Migration components
@@ -50,4 +51,5 @@ QtObject {
property Component migration50Component: Migration50 {}
property Component migration53Component: Migration53 {}
property Component migration54Component: Migration54 {}
property Component migration55Component: Migration55 {}
}
+1 -2
View File
@@ -25,7 +25,7 @@ Singleton {
- Default cache directory: ~/.cache/noctalia
*/
readonly property alias data: adapter // Used to access via Settings.data.xxx.yyy
readonly property int settingsVersion: 54
readonly property int settingsVersion: 55
property bool isDebug: Quickshell.env("NOCTALIA_DEBUG") === "1"
readonly property string shellName: "noctalia"
readonly property string configDir: Quickshell.env("NOCTALIA_CONFIG_DIR") || (Quickshell.env("XDG_CONFIG_HOME") || Quickshell.env("HOME") + "/.config") + "/" + shellName + "/"
@@ -442,7 +442,6 @@ Singleton {
property JsonObject controlCenter: JsonObject {
// Position: close_to_bar_button, center, top_left, top_right, bottom_left, bottom_right, bottom_center, top_center
property string position: "close_to_bar_button"
property bool openAtMouseOnBarRightClick: true
property string diskPath: "/"
property JsonObject shortcuts
shortcuts: JsonObject {