Icons: 99% done

This commit is contained in:
LemmyCook 2025-09-08 22:21:18 -04:00
parent 1f8c55d581
commit bacd65b274
19 changed files with 51 additions and 90 deletions

View file

@ -8,54 +8,6 @@ import qs.Commons
Singleton {
id: root
// "wifi_disable": "\uF61B",
// "wifi_low": "\uF619",
// "wifi_half": "\uF61A",
// "wifi_full": "\uF61C",
// "power": "\uF4FF",
// "close": "\uF659",
// "check": "\uF272",
// "panel": "\uF290",
// "memory": "\uF2D6",
// "trash": "\uF78B",
// "video_camera": "\uF21F",
// "ethernet": "\uF2EB",
// "speed": "\uF66B",
// "leaf": "\uF90C",
// "microphone": "\uF490",
// "microphone_muted": "\uF48F",
// "coffee": "\uF2E0",
// "refresh": "\uF130",
// "image": "\uF226",
// "contrast": "\uF288",
// "record": "\uF518",
// "pause": "\uF4C1",
// "play": "\uF4F2",
// "stop": "\uF590",
// "prev": "\uF561",
// "next": "\uF55B",
// "arrow_drop_down": "\uF22C",
// "warning": "\uF334",
// "info": "\uF26A",
// "upload": "\uF296",
// "download": "\uF294",
// "album": "\uF2FF",
// "eyedropper": "\uF342",
// "drive": "\uF412",
// "person": "\uF4DA",
// "bar": "\uF52B",
// "launcher": "\uF843",
// "palette": "\uF4B1",
// "sunrise": "\uF5A5",
// "moon_stars": "\uF496",
// "gauge": "\uF580",
// "lightning": "\uF46D",
// // another contrast \uF8F3 \uF8DA
// }
property var icons: {
"alarm-fill": "\uF101",
"alarm": "\uF102",

View file

@ -27,7 +27,8 @@ NPanel {
Layout.fillWidth: true
spacing: Style.marginM * scaling
NIcon { icon: "system_update_alt"
NIcon {
icon: "system_update_alt"
font.pointSize: Style.fontSizeXXL * scaling
color: Color.mPrimary
}
@ -101,7 +102,8 @@ NPanel {
Layout.fillHeight: true
} // Spacer
NIcon { icon: "hourglass_empty"
NIcon {
icon: "hourglass_empty"
font.pointSize: Style.fontSizeXXXL * scaling
color: Color.mPrimary
Layout.alignment: Qt.AlignHCenter
@ -217,7 +219,7 @@ NPanel {
spacing: Style.marginM * scaling
NIcon {
icon: "error"
icon: "exclamation"
font.pointSize: Style.fontSizeXXXL * scaling
color: Color.mError
Layout.alignment: Qt.AlignHCenter
@ -268,7 +270,7 @@ NPanel {
spacing: Style.marginM * scaling
NIcon {
icon: "error_outline"
icon: "exclamation"
font.pointSize: Style.fontSizeXXXL * scaling
color: Color.mError
Layout.alignment: Qt.AlignHCenter
@ -321,7 +323,7 @@ NPanel {
spacing: Style.marginM * scaling
NIcon {
icon: "check_circle"
icon: "check-lg"
font.pointSize: Style.fontSizeXXXL * scaling
color: Color.mPrimary
Layout.alignment: Qt.AlignHCenter
@ -493,7 +495,7 @@ NPanel {
}
NIconButton {
icon: "system_update_alt"
icon: "box-fill"
tooltipText: "Update all packages"
enabled: ArchUpdaterService.totalUpdates > 0
onClicked: {
@ -506,7 +508,7 @@ NPanel {
}
NIconButton {
icon: "check_box"
icon: "box"
tooltipText: "Update selected packages"
enabled: ArchUpdaterService.selectedPackagesCount > 0
onClicked: {

View file

@ -29,15 +29,15 @@ NIconButton {
return "terminal"
}
if (!ArchUpdaterService.aurHelperAvailable) {
return "package"
return "box"
}
if (ArchUpdaterService.aurBusy) {
return "sync"
return "arrow-repeat"
}
if (ArchUpdaterService.totalUpdates > 0) {
return "system_update_alt"
return "box-fill"
}
return "task_alt"
return "box"
}
// Tooltip with repo vs AUR breakdown and sample lists

View file

@ -9,12 +9,12 @@ NIconButton {
property ShellScreen screen
property real scaling: 1.0
icon: "contrast"
icon: "transparency"
tooltipText: "Toggle light/dark mode"
sizeRatio: 0.8
colorBg: Color.mSurfaceVariant
colorFg: Color.mOnSurface
colorBg: Settings.data.colorSchemes.darkMode ? Color.mSurfaceVariant : Color.mPrimary
colorFg: Settings.data.colorSchemes.darkMode ? Color.mOnSurface : Color.mOnPrimary
colorBorder: Color.transparent
colorBorderHover: Color.transparent

View file

@ -13,10 +13,10 @@ NIconButton {
sizeRatio: 0.8
icon: "coffee"
icon: "cup"
tooltipText: IdleInhibitorService.isInhibited ? "Disable keep awake" : "Enable keep awake"
colorBg: Color.mSurfaceVariant
colorFg: IdleInhibitorService.isInhibited ? Color.mPrimary : Color.mOnSurface
colorBg: IdleInhibitorService.isInhibited ? Color.mPrimary : Color.mSurfaceVariant
colorFg: IdleInhibitorService.isInhibited ? Color.mOnPrimary : Color.mOnSurface
colorBorder: Color.transparent
onClicked: {
IdleInhibitorService.manualToggle()

View file

@ -13,7 +13,7 @@ NIconButton {
sizeRatio: 0.8
icon: "power_settings_new"
icon: "power"
tooltipText: "Power Settings"
colorBg: Color.mSurfaceVariant
colorFg: Color.mError

View file

@ -33,7 +33,7 @@ NIconButton {
readonly property bool useDistroLogo: (widgetSettings.useDistroLogo
!== undefined) ? widgetSettings.useDistroLogo : widgetMetadata.useDistroLogo
icon: useDistroLogo ? "" :"layout-sidebar-inset-reverse"
icon: useDistroLogo ? "" : "layout-sidebar-inset-reverse"
tooltipText: "Open side panel."
sizeRatio: 0.8

View file

@ -64,7 +64,8 @@ RowLayout {
Layout.alignment: Qt.AlignVCenter
visible: showCpuUsage
NIcon { icon: "speedometer2"
NIcon {
icon: "speedometer2"
font.pointSize: Style.fontSizeM * scaling
Layout.alignment: Qt.AlignVCenter
}
@ -87,7 +88,8 @@ RowLayout {
Layout.alignment: Qt.AlignVCenter
visible: showCpuTemp
NIcon { icon: "fire"
NIcon {
icon: "fire"
font.pointSize: Style.fontSizeM * scaling
Layout.alignment: Qt.AlignVCenter
}
@ -110,7 +112,8 @@ RowLayout {
Layout.alignment: Qt.AlignVCenter
visible: showMemoryUsage
NIcon { icon: "memory"
NIcon {
icon: "memory"
font.pointSize: Style.fontSizeM * scaling
Layout.alignment: Qt.AlignVCenter
}
@ -133,7 +136,8 @@ RowLayout {
Layout.alignment: Qt.AlignVCenter
visible: showNetworkStats
NIcon { icon: "download"
NIcon {
icon: "download"
font.pointSize: Style.fontSizeM * scaling
Layout.alignment: Qt.AlignVCenter
}
@ -156,7 +160,8 @@ RowLayout {
Layout.alignment: Qt.AlignVCenter
visible: showNetworkStats
NIcon { icon: "upload"
NIcon {
icon: "upload"
font.pointSize: Style.fontSizeM * scaling
Layout.alignment: Qt.AlignVCenter
}

View file

@ -45,9 +45,7 @@ Item {
if (AudioService.muted) {
return "volume-mute"
}
return AudioService.volume
<= Number.EPSILON ? "volume-off" : (AudioService.volume
< 0.5 ? "volume-down" : "volume-up")
return AudioService.volume <= Number.EPSILON ? "volume-off" : (AudioService.volume < 0.5 ? "volume-down" : "volume-up")
}
// Connection used to open the pill when volume changes

View file

@ -65,7 +65,8 @@ ColumnLayout {
Layout.alignment: Qt.AlignVCenter
// One device BT icon
NIcon { icon: BluetoothService.getDeviceIcon(modelData)
NIcon {
icon: BluetoothService.getDeviceIcon(modelData)
font.pointSize: Style.fontSizeXXL * scaling
color: getContentColor(Color.mOnSurface)
Layout.alignment: Qt.AlignVCenter

View file

@ -27,7 +27,8 @@ NPanel {
Layout.fillWidth: true
spacing: Style.marginM * scaling
NIcon { icon: "bluetooth"
NIcon {
icon: "bluetooth"
font.pointSize: Style.fontSizeXXL * scaling
color: Color.mPrimary
}
@ -41,8 +42,7 @@ NPanel {
}
NIconButton {
icon: BluetoothService.adapter
&& BluetoothService.adapter.discovering ? "stop" : "arrow-repeat"
icon: BluetoothService.adapter && BluetoothService.adapter.discovering ? "stop" : "arrow-repeat"
tooltipText: "Refresh Devices"
sizeRatio: 0.8
onClicked: {

View file

@ -30,7 +30,8 @@ NPanel {
Layout.fillWidth: true
spacing: Style.marginM * scaling
NIcon { icon: "bell"
NIcon {
icon: "bell"
font.pointSize: Style.fontSizeXXL * scaling
color: Color.mPrimary
}
@ -83,7 +84,8 @@ NPanel {
Layout.fillHeight: true
}
NIcon { icon: "bell-slash"
NIcon {
icon: "bell-slash"
font.pointSize: 64 * scaling
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignHCenter

View file

@ -31,7 +31,7 @@ NBox {
}
NIcon {
text: "album"
icon: "disc"
font.pointSize: Style.fontSizeXXXL * 2.5 * scaling
color: Color.mPrimary
Layout.alignment: Qt.AlignHCenter
@ -162,14 +162,14 @@ NBox {
anchors.fill: parent
anchors.margins: Style.marginXS * scaling
imagePath: MediaService.trackArtUrl
fallbackIcon: "album"
fallbackIcon: "disc"
borderColor: Color.mOutline
borderWidth: Math.max(1, Style.borderS * scaling)
}
// Fallback icon when no album art available
NIcon {
icon: "album"
icon: "disc"
color: Color.mPrimary
font.pointSize: Style.fontSizeL * 12 * scaling
visible: !trackArt.visible

View file

@ -41,7 +41,7 @@ NBox {
// Idle Inhibitor
NIconButton {
icon: "cup-hot"
icon: "cup"
tooltipText: IdleInhibitorService.isInhibited ? "Disable keep awake." : "Enable keep awake."
colorBg: IdleInhibitorService.isInhibited ? Color.mPrimary : Color.mSurfaceVariant
colorFg: IdleInhibitorService.isInhibited ? Color.mOnPrimary : Color.mPrimary

View file

@ -27,7 +27,7 @@ NBox {
RowLayout {
spacing: Style.marginS * scaling
NIcon {
text: weatherReady ? LocationService.weatherSymbolFromCode(
icon: weatherReady ? LocationService.weatherSymbolFromCode(
LocationService.data.weather.current_weather.weathercode) : ""
font.pointSize: Style.fontSizeXXXL * 1.75 * scaling
color: Color.mPrimary

View file

@ -33,7 +33,8 @@ NPanel {
Layout.fillWidth: true
spacing: Style.marginM * scaling
NIcon { icon: Settings.data.network.wifiEnabled ? "wifi" : "wifi-off"
NIcon {
icon: Settings.data.network.wifiEnabled ? "wifi" : "wifi-off"
font.pointSize: Style.fontSizeXXL * scaling
color: Settings.data.network.wifiEnabled ? Color.mPrimary : Color.mOnSurfaceVariant
}

View file

@ -54,7 +54,7 @@ Rectangle {
// Fallback icon
NIcon {
anchors.centerIn: parent
text: fallbackIcon
icon: fallbackIcon
font.pointSize: fallbackIconSize
visible: fallbackIcon !== undefined && fallbackIcon !== "" && (imagePath === undefined || imagePath === "")
z: 0

View file

@ -74,7 +74,7 @@ Rectangle {
// Fallback icon
NIcon {
anchors.centerIn: parent
text: fallbackIcon
icon: fallbackIcon
font.pointSize: fallbackIconSize
visible: fallbackIcon !== undefined && fallbackIcon !== "" && (imagePath === undefined || imagePath === "")
z: 0

View file

@ -118,7 +118,7 @@ Item {
// Icon
NIcon {
id: icon
text: (root.type == "warning") ? "warning" : "info"
icon: (root.type == "warning") ? "exclamation-triangle" : "check-circle"
color: {
switch (root.type) {
case "warning":