feat(settings): add configuration for bar right-click actions

This commit is contained in:
tibssy
2026-03-01 23:57:32 +00:00
parent ba5f933c58
commit 79dd2d6def
5 changed files with 37 additions and 0 deletions
+2
View File
@@ -842,6 +842,8 @@
"behavior-wheel-wrap-label": "Wrap around",
"behavior-workspace-scroll-description": "Choose what the mouse wheel does on empty areas of the bar.",
"behavior-workspace-scroll-label": "Bar mouse wheel action",
"behavior-right-click-description": "Choose what right click does on empty areas of the bar.",
"behavior-right-click-label": "Bar right click action",
"monitor-configure-widgets": "Configure widgets",
"monitor-override-settings": "Override global settings",
"monitor-override-settings-description": "Use custom settings for this monitor.",
+1
View File
@@ -70,6 +70,7 @@
]
},
"mouseWheelAction": "none",
"rightClickAction": "controlCenter",
"reverseScroll": false,
"mouseWheelWrap": true,
"screenOverrides": []
+9
View File
@@ -377,6 +377,15 @@
"subTab": 2,
"subTabLabel": "common.behavior"
},
{
"labelKey": "panels.bar.behavior-right-click-label",
"descriptionKey": "panels.bar.behavior-right-click-description",
"widget": "NComboBox",
"tab": 4,
"tabLabel": "panels.bar.title",
"subTab": 2,
"subTabLabel": "common.behavior"
},
{
"labelKey": "panels.bar.monitor-override-settings",
"descriptionKey": "panels.bar.monitor-override-settings-description",
+1
View File
@@ -257,6 +257,7 @@ Singleton {
]
}
property string mouseWheelAction: "none"
property string rightClickAction: "controlCenter"
property bool reverseScroll: false
property bool mouseWheelWrap: true
// Per-screen overrides for position and widgets
@@ -11,6 +11,7 @@ ColumnLayout {
Layout.fillWidth: true
readonly property string effectiveWheelAction: Settings.data.bar.mouseWheelAction || "none"
readonly property string effectiveRightClickAction: Settings.data.bar.rightClickAction || "controlCenter"
NComboBox {
Layout.fillWidth: true
@@ -59,4 +60,27 @@ ColumnLayout {
onToggled: checked => Settings.data.bar.mouseWheelWrap = checked
visible: Settings.data.bar.mouseWheelAction === "workspace"
}
NComboBox {
Layout.fillWidth: true
label: I18n.tr("panels.bar.behavior-right-click-label")
description: I18n.tr("panels.bar.behavior-right-click-description")
model: [
{
"key": "none",
"name": I18n.tr("common.none")
},
{
"key": "controlCenter",
"name": I18n.tr("tooltips.open-control-center")
},
{
"key": "settings",
"name": I18n.tr("tooltips.open-settings")
}
]
currentKey: root.effectiveRightClickAction
defaultValue: Settings.getDefaultValue("bar.rightClickAction")
onSelected: key => Settings.data.bar.rightClickAction = key
}
}