ActiveWindow: better autohide

This commit is contained in:
ItsLemmy
2025-09-25 08:42:10 -04:00
parent 644e24f409
commit 3809f290ed
4 changed files with 46 additions and 22 deletions
@@ -15,22 +15,32 @@ ColumnLayout {
// Local state
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
function saveSettings() {
var settings = Object.assign({}, widgetData || {})
settings.autoHide = valueAutoHide
settings.showIcon = valueShowIcon
settings.scrollingMode = valueScrollingMode
console.log(JSON.stringify(settings))
return settings
}
NToggle {
id: showIcon
Layout.fillWidth: true
label: I18n.tr("bar.widget-settings.active-window.auto-hide")
checked: root.valueAutoHide
onToggled: checked => root.valueAutoHide = checked
}
NToggle {
Layout.fillWidth: true
label: I18n.tr("bar.widget-settings.active-window.show-app-icon")
checked: root.valueShowIcon
onToggled: checked => root.valueShowIcon = checked
}
NComboBox {
label: I18n.tr("bar.widget-settings.active-window.scrolling-mode")
model: [{