mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
feat(settings): add configuration for bar right-click actions
This commit is contained in:
@@ -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.",
|
||||
|
||||
@@ -70,6 +70,7 @@
|
||||
]
|
||||
},
|
||||
"mouseWheelAction": "none",
|
||||
"rightClickAction": "controlCenter",
|
||||
"reverseScroll": false,
|
||||
"mouseWheelWrap": true,
|
||||
"screenOverrides": []
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user