mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-06-04 11:16:03 +00:00
Configurable Icons for the indications, and I18n.
This commit is contained in:
@@ -14,18 +14,53 @@ ColumnLayout {
|
||||
property var widgetMetadata: null
|
||||
|
||||
// Local state
|
||||
property string valueIndicatorStyle: widgetData.indicatorStyle !== undefined ? widgetData.indicatorStyle : widgetMetadata.indicatorStyle
|
||||
property bool valueShowCapsLock: widgetData.showCapsLock !== undefined ? widgetData.showCapsLock : widgetMetadata.showCapsLock
|
||||
property bool valueShowNumLock: widgetData.showNumLock !== undefined ? widgetData.showNumLock : widgetMetadata.showNumLock
|
||||
property bool valueShowScrollLock: widgetData.showScrollLock !== undefined ? widgetData.showScrollLock : widgetMetadata.showScrollLock
|
||||
|
||||
function saveSettings() {
|
||||
var settings = Object.assign({}, widgetData || {})
|
||||
settings.indicatorStyle = valueIndicatorStyle
|
||||
settings.showCapsLock = valueShowCapsLock
|
||||
settings.showNumLock = valueShowNumLock
|
||||
settings.showScrollLock = valueShowScrollLock
|
||||
return settings
|
||||
}
|
||||
|
||||
NComboBox {
|
||||
Layout.fillWidth: true
|
||||
label: I18n.tr("bar.widget-settings.lock-keys.indicator-style.label")
|
||||
description: I18n.tr("bar.widget-settings.lock-keys.indicator-style.description")
|
||||
model: [{
|
||||
"key": "large",
|
||||
"name": I18n.tr("bar.widget-settings.lock-keys.indicator-style.large")
|
||||
}, {
|
||||
"key": "small",
|
||||
"name": I18n.tr("bar.widget-settings.lock-keys.indicator-style.small")
|
||||
}, {
|
||||
"key": "square",
|
||||
"name": I18n.tr("bar.widget-settings.lock-keys.indicator-style.square")
|
||||
}, {
|
||||
"key": "square-round",
|
||||
"name": I18n.tr("bar.widget-settings.lock-keys.indicator-style.square-round")
|
||||
}, {
|
||||
"key": "circle",
|
||||
"name": I18n.tr("bar.widget-settings.lock-keys.indicator-style.circle")
|
||||
}, {
|
||||
"key": "circle-dash",
|
||||
"name": I18n.tr("bar.widget-settings.lock-keys.indicator-style.circle-dash")
|
||||
}, {
|
||||
"key": "circle-dot",
|
||||
"name": I18n.tr("bar.widget-settings.lock-keys.indicator-style.circle-dot")
|
||||
}, {
|
||||
"key": "hex",
|
||||
"name": I18n.tr("bar.widget-settings.lock-keys.indicator-style.hex")
|
||||
}]
|
||||
currentKey: valueIndicatorStyle
|
||||
onSelected: key => valueIndicatorStyle = key
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("bar.widget-settings.lock-keys.show-caps-lock.label")
|
||||
description: I18n.tr("bar.widget-settings.lock-keys.show-caps-lock.description")
|
||||
|
||||
Reference in New Issue
Block a user