Icons: Plus and Minus

+ removed vertical hack in NIcon
This commit is contained in:
LemmyCook 2025-09-08 16:02:21 -04:00
parent ea6b8e0c02
commit b91112fc7a
7 changed files with 9 additions and 16 deletions

View file

@ -85,7 +85,7 @@ NBox {
} }
NIconButton { NIconButton {
icon: FontService.icons["add"] icon: FontService.icons["plus"]
colorBg: Color.mPrimary colorBg: Color.mPrimary
colorFg: Color.mOnPrimary colorFg: Color.mOnPrimary

View file

@ -107,7 +107,8 @@ Popup {
RowLayout { RowLayout {
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: Style.marginM * scaling Layout.topMargin: Style.marginM * scaling
spacing: Style.marginM * scaling
Item { Item {
Layout.fillWidth: true Layout.fillWidth: true
} }

View file

@ -272,7 +272,7 @@ ColumnLayout {
// Button aligned to the center of the actual input field // Button aligned to the center of the actual input field
NIconButton { NIconButton {
icon: FontService.icons["add"] icon: FontService.icons["plus"]
Layout.alignment: Qt.AlignBottom Layout.alignment: Qt.AlignBottom
Layout.bottomMargin: blacklistInput.description ? Style.marginS * scaling : 0 Layout.bottomMargin: blacklistInput.description ? Style.marginS * scaling : 0
onClicked: { onClicked: {

View file

@ -68,7 +68,8 @@ Singleton {
"download": "\uF01A", "download": "\uF01A",
"vinyl": "\uEFBD", "vinyl": "\uEFBD",
"link": "\uF0C1", "link": "\uF0C1",
"add": "\uF055", // FIXME UGLY "plus": "\uF067",
"minus": "\uF068",
"bell": "\uF189", "bell": "\uF189",
"bell_striked": "\uEE15", // FIXME "bell_striked": "\uEE15", // FIXME
"drive": "\uEE15", // FIXME "drive": "\uEE15", // FIXME

View file

@ -82,7 +82,6 @@ Rectangle {
// Icon (optional) // Icon (optional)
NIcon { NIcon {
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
layoutTopMargin: 1 * scaling
visible: root.icon !== "" visible: root.icon !== ""
text: root.icon text: root.icon
font.pointSize: root.iconSize font.pointSize: root.iconSize

View file

@ -3,18 +3,10 @@ import QtQuick.Layouts
import qs.Commons import qs.Commons
import qs.Widgets import qs.Widgets
Text { Text {
// Optional layout nudge for optical alignment when used inside Layouts text: "\uEE15" // fallback/default to skull icon
property real layoutTopMargin: 0
text: "\uEE15" // default skull icon
font.family: "bootstrap-icons" font.family: "bootstrap-icons"
font.pointSize: Style.fontSizeL * scaling 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 color: Color.mOnSurface
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
Layout.topMargin: layoutTopMargin
} }

View file

@ -95,7 +95,7 @@ RowLayout {
NIcon { NIcon {
anchors.centerIn: parent anchors.centerIn: parent
text: "remove" text: FontService.icons["minus"]
font.pointSize: Style.fontSizeS * scaling font.pointSize: Style.fontSizeS * scaling
color: decreaseArea.containsMouse ? Color.mOnPrimary : Color.mPrimary color: decreaseArea.containsMouse ? Color.mOnPrimary : Color.mPrimary
} }
@ -130,7 +130,7 @@ RowLayout {
NIcon { NIcon {
anchors.centerIn: parent anchors.centerIn: parent
text: "add" text: FontService.icons["plus"]
font.pointSize: Style.fontSizeS * scaling font.pointSize: Style.fontSizeS * scaling
color: increaseArea.containsMouse ? Color.mOnPrimary : Color.mPrimary color: increaseArea.containsMouse ? Color.mOnPrimary : Color.mPrimary
} }