mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
refactor(settings): remove redundant right-click option from control center
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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 {}
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user