Icons: huge cleanup

This commit is contained in:
LemmyCook 2025-09-08 22:05:57 -04:00
parent ccdb4e0664
commit 1f8c55d581
53 changed files with 155 additions and 174 deletions

View file

@ -83,7 +83,7 @@ Rectangle {
NIcon {
Layout.alignment: Qt.AlignVCenter
visible: root.icon !== ""
text: root.icon
icon: root.icon
font.pointSize: root.iconSize
color: {
if (!root.enabled)

View file

@ -57,7 +57,7 @@ RowLayout {
NIcon {
visible: root.checked
anchors.centerIn: parent
text: "check"
icon: "check-lg"
color: root.activeOnColor
font.pointSize: Math.max(Style.fontSizeS, root.baseSize * 0.7) * scaling
}

View file

@ -99,7 +99,7 @@ Rectangle {
NIcon {
anchors.centerIn: parent
text: root.icon
icon: root.icon
font.pointSize: Style.fontSizeLargeXL * scaling * contentScale
color: Color.mOnSurface
horizontalAlignment: Text.AlignHCenter

View file

@ -59,7 +59,7 @@ Rectangle {
}
NIcon {
text: Bootstrap.icons["eyedropper"]
icon: "paint-bucket"
color: Color.mOnSurfaceVariant
}
}

View file

@ -130,7 +130,7 @@ Popup {
spacing: Style.marginS * scaling
NIcon {
text: Bootstrap.icons["eyedropper"]
icon: "eyedropper"
font.pointSize: Style.fontSizeXXL * scaling
color: Color.mPrimary
}
@ -148,7 +148,7 @@ Popup {
}
NIconButton {
icon: Bootstrap.icons["x-lg"]
icon: "x-lg"
onClicked: root.close()
}
}
@ -492,7 +492,7 @@ Popup {
NButton {
id: cancelButton
text: "Cancel"
icon: Bootstrap.icons["x-lg"]
icon: "x-lg"
outlined: cancelButton.hovered ? false : true
customHeight: 36 * scaling
customWidth: 100 * scaling
@ -503,7 +503,7 @@ Popup {
NButton {
text: "Apply"
icon: Bootstrap.icons["check"]
icon: "check-lg"
customHeight: 36 * scaling
customWidth: 100 * scaling
onClicked: {

View file

@ -85,7 +85,7 @@ RowLayout {
indicator: NIcon {
x: combo.width - width - Style.marginM * scaling
y: combo.topPadding + (combo.availableHeight - height) / 2
text: Bootstrap.icons["chevron-down"]
icon: "chevron-down"
font.pointSize: Style.fontSizeL * scaling
}

View file

@ -4,6 +4,9 @@ import qs.Commons
import qs.Widgets
Text {
property string icon: "balloon"
text: Bootstrap.icons[icon]
font.family: "bootstrap-icons"
font.pointSize: Style.fontSizeL * scaling
color: Color.mOnSurface

View file

@ -39,7 +39,7 @@ Rectangle {
border.width: Math.max(1, Style.borderS * scaling)
NIcon {
text: root.icon
icon: root.icon
font.pointSize: Style.fontSizeM * scaling
color: root.hovering ? colorFgHover : colorFg
// Center horizontally

View file

@ -14,7 +14,7 @@ RowLayout {
property string placeholderText: ""
property string text: ""
property string actionButtonText: "Test"
property string actionButtonIcon: Bootstrap.icons["play"]
property string actionButtonIcon: "play"
property bool actionButtonEnabled: text !== ""
// Signals

View file

@ -117,7 +117,7 @@ Item {
}
NIcon {
text: root.icon
icon: root.icon
font.pointSize: Style.fontSizeM * scaling
// When forced shown, use pill text color; otherwise accent color when hovered
color: forceOpen ? textColor : (showPill ? iconTextColor : Color.mOnSurface)

View file

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

View file

@ -118,7 +118,7 @@ Item {
// Icon
NIcon {
id: icon
text: (root.type == "warning") ? Bootstrap.icons["warning"] : Bootstrap.icons["info"]
text: (root.type == "warning") ? "warning" : "info"
color: {
switch (root.type) {
case "warning":
@ -162,7 +162,7 @@ Item {
// Close button (only if persistent or manual dismiss needed)
NIconButton {
icon: Bootstrap.icons["x-lg"]
icon: "x-lg"
visible: root.persistent || root.duration === 0
colorBg: Color.mSurfaceVariant