mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-06-08 12:52:24 +00:00
ActiveWindow: new setting to set your favorite width. Fix #417
This commit is contained in:
@@ -17,12 +17,14 @@ ColumnLayout {
|
||||
property bool valueShowIcon: widgetData.showIcon !== undefined ? widgetData.showIcon : widgetMetadata.showIcon
|
||||
property bool valueAutoHide: widgetData.autoHide !== undefined ? widgetData.autoHide : widgetMetadata.autoHide
|
||||
property string valueScrollingMode: widgetData.scrollingMode || widgetMetadata.scrollingMode
|
||||
property int valueWidth: widgetData.width !== undefined ? widgetData.width : widgetMetadata.width
|
||||
|
||||
function saveSettings() {
|
||||
var settings = Object.assign({}, widgetData || {})
|
||||
settings.autoHide = valueAutoHide
|
||||
settings.showIcon = valueShowIcon
|
||||
settings.scrollingMode = valueScrollingMode
|
||||
settings.width = parseInt(widthInput.text) || widgetMetadata.width
|
||||
return settings
|
||||
}
|
||||
|
||||
@@ -42,6 +44,15 @@ ColumnLayout {
|
||||
onToggled: checked => root.valueShowIcon = checked
|
||||
}
|
||||
|
||||
NTextInput {
|
||||
id: widthInput
|
||||
Layout.fillWidth: true
|
||||
label: I18n.tr("bar.widget-settings.active-window.width.label")
|
||||
description: I18n.tr("bar.widget-settings.active-window.width.description")
|
||||
placeholderText: widgetMetadata.width
|
||||
text: valueWidth
|
||||
}
|
||||
|
||||
NComboBox {
|
||||
label: I18n.tr("bar.widget-settings.active-window.scrolling-mode.label")
|
||||
description: I18n.tr("bar.widget-settings.active-window.scrolling-mode.description")
|
||||
|
||||
Reference in New Issue
Block a user