From b967e7ec804ca695a3d7d77c3b13747f784e1b27 Mon Sep 17 00:00:00 2001 From: Corey Woodworth Date: Fri, 24 Oct 2025 13:43:46 -0400 Subject: [PATCH 1/3] Switched to NTextInputButton on Audio Tab. --- Modules/Settings/Tabs/AudioTab.qml | 40 ++++++++++++------------------ 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/Modules/Settings/Tabs/AudioTab.qml b/Modules/Settings/Tabs/AudioTab.qml index 14237df3..d27a74e5 100644 --- a/Modules/Settings/Tabs/AudioTab.qml +++ b/Modules/Settings/Tabs/AudioTab.qml @@ -252,36 +252,28 @@ ColumnLayout { spacing: Style.marginS Layout.fillWidth: true - RowLayout { - spacing: Style.marginS + + NTextInputButton { + id: blacklistInput + label: I18n.tr("settings.audio.media.excluded-player.label") + description: I18n.tr("settings.audio.media.excluded-player.description") + placeholderText: I18n.tr("settings.audio.media.excluded-player.placeholder") + buttonIcon: "add" Layout.fillWidth: true - - NTextInput { - id: blacklistInput - label: I18n.tr("settings.audio.media.excluded-player.label") - description: I18n.tr("settings.audio.media.excluded-player.description") - placeholderText: I18n.tr("settings.audio.media.excluded-player.placeholder") - } - - // Button aligned to the center of the actual input field - NIconButton { - icon: "add" - Layout.alignment: Qt.AlignBottom - Layout.bottomMargin: blacklistInput.description ? Style.marginS : 0 - onClicked: { - const val = (blacklistInput.text || "").trim() - if (val !== "") { - const arr = (Settings.data.audio.mprisBlacklist || []) - if (!arr.find(x => String(x).toLowerCase() === val.toLowerCase())) { - Settings.data.audio.mprisBlacklist = [...arr, val] - blacklistInput.text = "" - MediaService.updateCurrentPlayer() - } + onButtonClicked: { + const val = (blacklistInput.text || "").trim() + if (val !== "") { + const arr = (Settings.data.audio.mprisBlacklist || []) + if (!arr.find(x => String(x).toLowerCase() === val.toLowerCase())) { + Settings.data.audio.mprisBlacklist = [...arr, val] + blacklistInput.text = "" + MediaService.updateCurrentPlayer() } } } } + // Current blacklist entries Flow { Layout.fillWidth: true From f37f999806a3c3140836676ad29b78dd195e00ae Mon Sep 17 00:00:00 2001 From: Corey Woodworth Date: Fri, 24 Oct 2025 13:45:31 -0400 Subject: [PATCH 2/3] Added support for NTextInput's inputIconName on NTextInputButton. --- Widgets/NTextInputButton.qml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Widgets/NTextInputButton.qml b/Widgets/NTextInputButton.qml index 89ec8ffd..dfda42f9 100644 --- a/Widgets/NTextInputButton.qml +++ b/Widgets/NTextInputButton.qml @@ -12,6 +12,7 @@ ColumnLayout { property alias placeholderText: input.placeholderText property string label: "" property string description: "" + property string inputIconName: "" property alias buttonIcon: button.icon property alias buttonTooltip: button.tooltipText property alias buttonEnabled: button.enabled @@ -38,6 +39,7 @@ ColumnLayout { NTextInput { id: input + inputIconName: root.inputIconName Layout.fillWidth: true Layout.alignment: Qt.AlignVCenter onTextChanged: root.inputTextChanged(text) From db14fb181383d4ad895ecd359f44caf493d77b88 Mon Sep 17 00:00:00 2001 From: Corey Woodworth Date: Fri, 24 Oct 2025 14:03:36 -0400 Subject: [PATCH 3/3] Swapped TraySetting's NTextInput and NIconButton for NTextInputButton --- .../Settings/Bar/WidgetSettings/TraySettings.qml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/Modules/Settings/Bar/WidgetSettings/TraySettings.qml b/Modules/Settings/Bar/WidgetSettings/TraySettings.qml index dc3a4ef4..7139a314 100644 --- a/Modules/Settings/Bar/WidgetSettings/TraySettings.qml +++ b/Modules/Settings/Bar/WidgetSettings/TraySettings.qml @@ -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 } } }