Icons: WIP using a proper mapping table

This commit is contained in:
LemmyCook 2025-09-08 21:05:48 -04:00
parent 8da2cdf430
commit a4107c87c0
41 changed files with 2277 additions and 183 deletions

View file

@ -20,7 +20,7 @@ NIconButton {
colorBorder: Color.transparent
colorBorderHover: Color.transparent
icon: FontService.icons["bluetooth"]
icon: Bootstrap.icons["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 ? FontService.icons["brightness_low"] : FontService.icons["brightness_high"]
return brightness <= 0.5 ? Bootstrap.icons["brightness_low"] : Bootstrap.icons["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: FontService.icons["contrast"]
icon: Bootstrap.icons["contrast"]
tooltipText: "Toggle light/dark mode"
sizeRatio: 0.8

View file

@ -13,7 +13,7 @@ NIconButton {
sizeRatio: 0.8
icon: FontService.icons["coffee"]
icon: Bootstrap.icons["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: FontService.icons["keyboard"]
icon: Bootstrap.icons["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 ? FontService.icons["pause"] : FontService.icons["play"]
text: MediaService.isPlaying ? Bootstrap.icons["pause"] : Bootstrap.icons["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 ? FontService.icons["pause"] : FontService.icons["play"]
fallbackIcon: MediaService.isPlaying ? Bootstrap.icons["pause"] : Bootstrap.icons["play"]
fallbackIconSize: 10 * scaling
borderWidth: 0
border.color: Color.transparent

View file

@ -20,7 +20,7 @@ NIconButton {
colorBorder: Color.transparent
colorBorderHover: Color.transparent
icon: FontService.icons["moon_stars"]
icon: Bootstrap.icons["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 ? FontService.icons["bell_striked"] : FontService.icons["bell"]
icon: Settings.data.notifications.doNotDisturb ? Bootstrap.icons["bell_striked"] : Bootstrap.icons["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

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

View file

@ -66,7 +66,7 @@ RowLayout {
NIcon {
id: cpuUsageIcon
text: FontService.icons["speed"]
text: Bootstrap.icons["speed"]
Layout.alignment: Qt.AlignVCenter
}
@ -91,7 +91,7 @@ RowLayout {
visible: showCpuTemp
NIcon {
text: FontService.icons["thermometer"]
text: Bootstrap.icons["thermometer"]
Layout.alignment: Qt.AlignVCenter
}
@ -114,7 +114,7 @@ RowLayout {
visible: showMemoryUsage
NIcon {
text: FontService.icons["memory"]
text: Bootstrap.icons["memory"]
Layout.alignment: Qt.AlignVCenter
}
@ -137,7 +137,7 @@ RowLayout {
visible: showNetworkStats
NIcon {
text: FontService.icons["download"]
text: Bootstrap.icons["download"]
Layout.alignment: Qt.AlignVCenter
}
@ -160,7 +160,7 @@ RowLayout {
visible: showNetworkStats
NIcon {
text: FontService.icons["upload"]
text: Bootstrap.icons["upload"]
Layout.alignment: Qt.AlignVCenter
}

View file

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

View file

@ -23,7 +23,7 @@ NIconButton {
icon: {
try {
if (NetworkService.ethernetConnected) {
return FontService.icons["ethernet"]
return Bootstrap.icons["ethernet"]
}
let connected = false
let signalStrength = 0