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

@ -20,7 +20,7 @@ NIconButton {
colorBorder: Color.transparent
colorBorderHover: Color.transparent
icon: Bootstrap.icons["bluetooth"]
icon: "bluetooth"
tooltipText: "Bluetooth"
onClicked: PanelService.getPanel("bluetoothPanel")?.toggle(screen, this)
}

View file

@ -46,7 +46,7 @@ Item {
function getIcon() {
var monitor = getMonitor()
var brightness = monitor ? monitor.brightness : 0
return brightness <= 0.5 ? Bootstrap.icons["brightness_low"] : Bootstrap.icons["brightness_high"]
return brightness <= 0.5 ? "brightness-low" : "brightness-high"
}
// Connection used to open the pill when brightness changes

View file

@ -9,7 +9,7 @@ NIconButton {
property ShellScreen screen
property real scaling: 1.0
icon: Bootstrap.icons["contrast"]
icon: "contrast"
tooltipText: "Toggle light/dark mode"
sizeRatio: 0.8

View file

@ -13,7 +13,7 @@ NIconButton {
sizeRatio: 0.8
icon: Bootstrap.icons["coffee"]
icon: "coffee"
tooltipText: IdleInhibitorService.isInhibited ? "Disable keep awake" : "Enable keep awake"
colorBg: Color.mSurfaceVariant
colorFg: IdleInhibitorService.isInhibited ? Color.mPrimary : Color.mOnSurface

View file

@ -24,7 +24,7 @@ Item {
anchors.verticalCenter: parent.verticalCenter
rightOpen: BarWidgetRegistry.getNPillDirection(root)
icon: Bootstrap.icons["keyboard"]
icon: "keyboard"
iconCircleColor: Color.mPrimary
collapsedIconColor: Color.mOnSurface
autoHide: false // Important to be false so we can hover as long as we want

View file

@ -134,7 +134,7 @@ RowLayout {
NIcon {
id: windowIcon
text: MediaService.isPlaying ? Bootstrap.icons["pause"] : Bootstrap.icons["play"]
text: MediaService.isPlaying ? "pause" : "play"
font.pointSize: Style.fontSizeL * scaling
verticalAlignment: Text.AlignVCenter
Layout.alignment: Qt.AlignVCenter
@ -154,7 +154,7 @@ RowLayout {
id: trackArt
anchors.fill: parent
imagePath: MediaService.trackArtUrl
fallbackIcon: MediaService.isPlaying ? Bootstrap.icons["pause"] : Bootstrap.icons["play"]
fallbackIcon: MediaService.isPlaying ? "pause" : "play"
fallbackIconSize: 10 * scaling
borderWidth: 0
border.color: Color.transparent

View file

@ -43,9 +43,9 @@ Item {
function getIcon() {
if (AudioService.inputMuted) {
return "mic_off"
return "mic-mute"
}
return AudioService.inputVolume <= Number.EPSILON ? "mic_off" : (AudioService.inputVolume < 0.33 ? "mic" : "mic")
return AudioService.inputVolume <= Number.EPSILON ? "mic-mute" : (AudioService.inputVolume < 0.33 ? "mic" : "mic")
}
// Connection used to open the pill when input volume changes

View file

@ -20,7 +20,7 @@ NIconButton {
colorBorder: Color.transparent
colorBorderHover: Color.transparent
icon: Bootstrap.icons["moon-stars"]
icon: "moon-stars"
tooltipText: `Night light: ${Settings.data.nightLight.enabled ? "enabled." : "disabled."}\nLeft click to toggle.\nRight click to access settings.`
onClicked: Settings.data.nightLight.enabled = !Settings.data.nightLight.enabled

View file

@ -53,7 +53,7 @@ NIconButton {
}
sizeRatio: 0.8
icon: Settings.data.notifications.doNotDisturb ? Bootstrap.icons["bell-slash"] : Bootstrap.icons["bell"]
icon: Settings.data.notifications.doNotDisturb ? "bell-slash" : "bell"
tooltipText: Settings.data.notifications.doNotDisturb ? "Notification history.\nRight-click to disable 'Do Not Disturb'." : "Notification history.\nRight-click to enable 'Do Not Disturb'."
colorBg: Color.mSurfaceVariant
colorFg: Color.mOnSurface

View file

@ -19,13 +19,13 @@ NIconButton {
function profileIcon() {
if (!hasPP)
return Bootstrap.icons["yin-yang"]
return "yin-yang"
if (powerProfiles.profile === PowerProfile.Performance)
return Bootstrap.icons["speedometer2"]
return "speedometer2"
if (powerProfiles.profile === PowerProfile.Balanced)
return Bootstrap.icons["yin-yang"]
return "yin-yang"
if (powerProfiles.profile === PowerProfile.PowerSaver)
return Bootstrap.icons["leaf"]
return "leaf"
}
function profileName() {
@ -57,4 +57,4 @@ NIconButton {
colorBorder: Color.transparent
colorBorderHover: Color.transparent
onClicked: root.changeProfile()
}
}

View file

@ -11,7 +11,7 @@ NIconButton {
property real scaling: 1.0
visible: ScreenRecorderService.isRecording
icon: "videocam"
icon: "camera-video"
tooltipText: "Screen recording is active\nClick to stop recording"
sizeRatio: 0.8
colorBg: Color.mPrimary

View file

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

View file

@ -64,14 +64,12 @@ RowLayout {
Layout.alignment: Qt.AlignVCenter
visible: showCpuUsage
NIcon {
id: cpuUsageIcon
text: Bootstrap.icons["speedometer2"]
NIcon { icon: "speedometer2"
font.pointSize: Style.fontSizeM * scaling
Layout.alignment: Qt.AlignVCenter
}
NText {
id: cpuUsageText
text: `${SystemStatService.cpuUsage}%`
font.family: Settings.data.ui.fontFixed
font.pointSize: Style.fontSizeS * scaling
@ -89,8 +87,8 @@ RowLayout {
Layout.alignment: Qt.AlignVCenter
visible: showCpuTemp
NIcon {
text: Bootstrap.icons["fire"]
NIcon { icon: "fire"
font.pointSize: Style.fontSizeM * scaling
Layout.alignment: Qt.AlignVCenter
}
@ -112,8 +110,8 @@ RowLayout {
Layout.alignment: Qt.AlignVCenter
visible: showMemoryUsage
NIcon {
text: Bootstrap.icons["memory"]
NIcon { icon: "memory"
font.pointSize: Style.fontSizeM * scaling
Layout.alignment: Qt.AlignVCenter
}
@ -135,8 +133,8 @@ RowLayout {
Layout.alignment: Qt.AlignVCenter
visible: showNetworkStats
NIcon {
text: Bootstrap.icons["download"]
NIcon { icon: "download"
font.pointSize: Style.fontSizeM * scaling
Layout.alignment: Qt.AlignVCenter
}
@ -158,8 +156,8 @@ RowLayout {
Layout.alignment: Qt.AlignVCenter
visible: showNetworkStats
NIcon {
text: Bootstrap.icons["upload"]
NIcon { icon: "upload"
font.pointSize: Style.fontSizeM * scaling
Layout.alignment: Qt.AlignVCenter
}

View file

@ -43,11 +43,11 @@ Item {
function getIcon() {
if (AudioService.muted) {
return Bootstrap.icons["volume-mute"]
return "volume-mute"
}
return AudioService.volume
<= Number.EPSILON ? Bootstrap.icons["volume-off"] : (AudioService.volume
< 0.5 ? Bootstrap.icons["volume-down"] : Bootstrap.icons["volume-up"])
<= Number.EPSILON ? "volume-off" : (AudioService.volume
< 0.5 ? "volume-down" : "volume-up")
}
// Connection used to open the pill when volume changes

View file

@ -23,7 +23,7 @@ NIconButton {
icon: {
try {
if (NetworkService.ethernetConnected) {
return Bootstrap.icons["ethernet"]
return "ethernet"
}
let connected = false
let signalStrength = 0
@ -34,7 +34,7 @@ NIconButton {
break
}
}
return connected ? NetworkService.signalIcon(signalStrength) : "wifi_find"
return connected ? NetworkService.signalIcon(signalStrength) : "wifi-off"
} catch (error) {
Logger.error("Wi-Fi", "Error getting icon:", error)
return "signal_wifi_bad"