Swapped TraySetting's NTextInput and NIconButton for NTextInputButton

This commit is contained in:
Corey Woodworth
2025-10-24 14:03:36 -04:00
parent f37f999806
commit db14fb1813
@@ -50,17 +50,12 @@ ColumnLayout {
Layout.fillWidth: true
spacing: Style.marginS
NTextInput {
NTextInputButton {
id: newRuleInput
Layout.fillWidth: true
placeholderText: I18n.tr("settings.bar.tray.blacklist.placeholder")
}
NIconButton {
Layout.alignment: Qt.AlignVCenter
icon: "add"
baseSize: Style.baseWidgetSize * 0.8
onClicked: {
buttonIcon: "add"
onButtonClicked: {
if (newRuleInput.text.length > 0) {
var newRule = newRuleInput.text.trim()
var exists = false
@@ -72,13 +67,12 @@ ColumnLayout {
}
if (!exists) {
blacklistModel.append({
"rule": newRule
})
"rule": newRule
})
newRuleInput.text = ""
}
}
}
enabled: newRuleInput.text.length > 0
}
}
}