feat: Add custom button collapse condition

This commit is contained in:
loner
2025-10-23 00:01:31 +08:00
parent c832d7b2da
commit beefae7350
4 changed files with 32 additions and 3 deletions
@@ -23,6 +23,7 @@ ColumnLayout {
settings.rightClickExec = rightClickExecInput.text
settings.middleClickExec = middleClickExecInput.text
settings.textCommand = textCommandInput.text
settings.textCollapse = textCollapseInput.text
settings.textStream = valueTextStream
settings.textIntervalMs = parseInt(textIntervalInput.text || textIntervalInput.placeholderText, 10)
return settings
@@ -109,6 +110,16 @@ ColumnLayout {
text: widgetData?.textCommand || widgetMetadata.textCommand
}
NTextInput {
id: textCollapseInput
Layout.fillWidth: true
visible: valueTextStream
label: I18n.tr("bar.widget-settings.custom-button.collapse-condition.label")
description: I18n.tr("bar.widget-settings.custom-button.collapse-condition.description")
placeholderText: I18n.tr("placeholders.enter-text")
text: widgetData?.textCollapse || widgetMetadata.textCollapse
}
NTextInput {
id: textIntervalInput
Layout.fillWidth: true