ActiveWindow: new setting to set your favorite width. Fix #417

This commit is contained in:
ItsLemmy
2025-10-04 14:33:04 -04:00
parent 502f3da4e8
commit bc14ab95f9
9 changed files with 38 additions and 3 deletions
@@ -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")