From b91112fc7a2f95499d4f341f266b254fe3cc4b5b Mon Sep 17 00:00:00 2001 From: LemmyCook Date: Mon, 8 Sep 2025 16:02:21 -0400 Subject: [PATCH] Icons: Plus and Minus + removed vertical hack in NIcon --- Modules/SettingsPanel/Bar/BarSectionEditor.qml | 2 +- Modules/SettingsPanel/Bar/BarWidgetSettingsDialog.qml | 3 ++- Modules/SettingsPanel/Tabs/AudioTab.qml | 2 +- Services/FontService.qml | 3 ++- Widgets/NButton.qml | 1 - Widgets/NIcon.qml | 10 +--------- Widgets/NSpinBox.qml | 4 ++-- 7 files changed, 9 insertions(+), 16 deletions(-) diff --git a/Modules/SettingsPanel/Bar/BarSectionEditor.qml b/Modules/SettingsPanel/Bar/BarSectionEditor.qml index 4f0bba4..42b259d 100644 --- a/Modules/SettingsPanel/Bar/BarSectionEditor.qml +++ b/Modules/SettingsPanel/Bar/BarSectionEditor.qml @@ -85,7 +85,7 @@ NBox { } NIconButton { - icon: FontService.icons["add"] + icon: FontService.icons["plus"] colorBg: Color.mPrimary colorFg: Color.mOnPrimary diff --git a/Modules/SettingsPanel/Bar/BarWidgetSettingsDialog.qml b/Modules/SettingsPanel/Bar/BarWidgetSettingsDialog.qml index e0cf418..51ebc09 100644 --- a/Modules/SettingsPanel/Bar/BarWidgetSettingsDialog.qml +++ b/Modules/SettingsPanel/Bar/BarWidgetSettingsDialog.qml @@ -107,7 +107,8 @@ Popup { RowLayout { Layout.fillWidth: true Layout.topMargin: Style.marginM * scaling - + spacing: Style.marginM * scaling + Item { Layout.fillWidth: true } diff --git a/Modules/SettingsPanel/Tabs/AudioTab.qml b/Modules/SettingsPanel/Tabs/AudioTab.qml index 3473a43..e5509ea 100644 --- a/Modules/SettingsPanel/Tabs/AudioTab.qml +++ b/Modules/SettingsPanel/Tabs/AudioTab.qml @@ -272,7 +272,7 @@ ColumnLayout { // Button aligned to the center of the actual input field NIconButton { - icon: FontService.icons["add"] + icon: FontService.icons["plus"] Layout.alignment: Qt.AlignBottom Layout.bottomMargin: blacklistInput.description ? Style.marginS * scaling : 0 onClicked: { diff --git a/Services/FontService.qml b/Services/FontService.qml index ceccb30..1049adf 100644 --- a/Services/FontService.qml +++ b/Services/FontService.qml @@ -68,7 +68,8 @@ Singleton { "download": "\uF01A", "vinyl": "\uEFBD", "link": "\uF0C1", - "add": "\uF055", // FIXME UGLY + "plus": "\uF067", + "minus": "\uF068", "bell": "\uF189", "bell_striked": "\uEE15", // FIXME "drive": "\uEE15", // FIXME diff --git a/Widgets/NButton.qml b/Widgets/NButton.qml index 75c9bc5..8d8425c 100644 --- a/Widgets/NButton.qml +++ b/Widgets/NButton.qml @@ -82,7 +82,6 @@ Rectangle { // Icon (optional) NIcon { Layout.alignment: Qt.AlignVCenter - layoutTopMargin: 1 * scaling visible: root.icon !== "" text: root.icon font.pointSize: root.iconSize diff --git a/Widgets/NIcon.qml b/Widgets/NIcon.qml index adfb22f..48b19eb 100644 --- a/Widgets/NIcon.qml +++ b/Widgets/NIcon.qml @@ -3,18 +3,10 @@ import QtQuick.Layouts import qs.Commons import qs.Widgets - Text { - // Optional layout nudge for optical alignment when used inside Layouts - property real layoutTopMargin: 0 - text: "\uEE15" // default skull icon + text: "\uEE15" // fallback/default to skull icon font.family: "bootstrap-icons" font.pointSize: Style.fontSizeL * scaling - font.variableAxes: { - "wght"// slightly bold to ensure all lines looks good - : (Font.Normal + Font.Bold) / 2.5 - } color: Color.mOnSurface verticalAlignment: Text.AlignVCenter - Layout.topMargin: layoutTopMargin } diff --git a/Widgets/NSpinBox.qml b/Widgets/NSpinBox.qml index 8049cf6..77693b7 100644 --- a/Widgets/NSpinBox.qml +++ b/Widgets/NSpinBox.qml @@ -95,7 +95,7 @@ RowLayout { NIcon { anchors.centerIn: parent - text: "remove" + text: FontService.icons["minus"] font.pointSize: Style.fontSizeS * scaling color: decreaseArea.containsMouse ? Color.mOnPrimary : Color.mPrimary } @@ -130,7 +130,7 @@ RowLayout { NIcon { anchors.centerIn: parent - text: "add" + text: FontService.icons["plus"] font.pointSize: Style.fontSizeS * scaling color: increaseArea.containsMouse ? Color.mOnPrimary : Color.mPrimary }