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

@ -31,7 +31,7 @@ NBox {
}
NIcon {
text: FontService.icons["album"]
text: Bootstrap.icons["album"]
font.pointSize: Style.fontSizeXXXL * 2.5 * scaling
color: Color.mPrimary
Layout.alignment: Qt.AlignHCenter
@ -89,7 +89,7 @@ NBox {
indicator: NIcon {
x: playerSelector.width - width
y: playerSelector.topPadding + (playerSelector.availableHeight - height) / 2
text: FontService.icons["arrow_drop_down"]
text: Bootstrap.icons["arrow_drop_down"]
font.pointSize: Style.fontSizeXXL * scaling
color: Color.mOnSurface
horizontalAlignment: Text.AlignRight
@ -162,14 +162,14 @@ NBox {
anchors.fill: parent
anchors.margins: Style.marginXS * scaling
imagePath: MediaService.trackArtUrl
fallbackIcon: FontService.icons["album"]
fallbackIcon: Bootstrap.icons["album"]
borderColor: Color.mOutline
borderWidth: Math.max(1, Style.borderS * scaling)
}
// Fallback icon when no album art available
NIcon {
text: FontService.icons["album"]
text: Bootstrap.icons["album"]
color: Color.mPrimary
font.pointSize: Style.fontSizeL * 12 * scaling
visible: !trackArt.visible
@ -307,7 +307,7 @@ NBox {
// Previous button
NIconButton {
icon: FontService.icons["prev"]
icon: Bootstrap.icons["prev"]
tooltipText: "Previous Media"
visible: MediaService.canGoPrevious
onClicked: MediaService.canGoPrevious ? MediaService.previous() : {}
@ -315,7 +315,7 @@ NBox {
// Play/Pause button
NIconButton {
icon: MediaService.isPlaying ? FontService.icons["pause"] : FontService.icons["play"]
icon: MediaService.isPlaying ? Bootstrap.icons["pause"] : Bootstrap.icons["play"]
tooltipText: MediaService.isPlaying ? "Pause" : "Play"
visible: (MediaService.canPlay || MediaService.canPause)
onClicked: (MediaService.canPlay || MediaService.canPause) ? MediaService.playPause() : {}
@ -323,7 +323,7 @@ NBox {
// Next button
NIconButton {
icon: FontService.icons["next"]
icon: Bootstrap.icons["next"]
tooltipText: "Next media"
visible: MediaService.canGoNext
onClicked: MediaService.canGoNext ? MediaService.next() : {}

View file

@ -28,7 +28,7 @@ NBox {
}
// Performance
NIconButton {
icon: FontService.icons["speed"]
icon: Bootstrap.icons["speed"]
tooltipText: "Set performance power profile."
enabled: hasPP
opacity: enabled ? Style.opacityFull : Style.opacityMedium
@ -42,7 +42,7 @@ NBox {
}
// Balanced
NIconButton {
icon: FontService.icons["yin_yang"]
icon: Bootstrap.icons["yin_yang"]
tooltipText: "Set balanced power profile."
enabled: hasPP
opacity: enabled ? Style.opacityFull : Style.opacityMedium
@ -56,7 +56,7 @@ NBox {
}
// Eco
NIconButton {
icon: FontService.icons["leaf"]
icon: Bootstrap.icons["leaf"]
tooltipText: "Set eco power profile."
enabled: hasPP
opacity: enabled ? Style.opacityFull : Style.opacityMedium

View file

@ -32,7 +32,7 @@ NBox {
width: Style.baseWidgetSize * 1.25 * scaling
height: Style.baseWidgetSize * 1.25 * scaling
imagePath: Settings.data.general.avatarImage
fallbackIcon: FontService.icons["person"]
fallbackIcon: Bootstrap.icons["person"]
borderColor: Color.mPrimary
borderWidth: Math.max(1, Style.borderM * scaling)
}
@ -58,7 +58,7 @@ NBox {
Layout.fillWidth: true
}
NIconButton {
icon: FontService.icons["gear"]
icon: Bootstrap.icons["gear"]
tooltipText: "Open settings."
onClicked: {
settingsPanel.requestedTab = SettingsPanel.Tab.General
@ -68,7 +68,7 @@ NBox {
NIconButton {
id: powerButton
icon: FontService.icons["power"]
icon: Bootstrap.icons["power"]
tooltipText: "Power menu."
onClicked: {
powerPanel.open(screen)
@ -78,7 +78,7 @@ NBox {
NIconButton {
id: closeButton
icon: FontService.icons["close"]
icon: Bootstrap.icons["close"]
tooltipText: "Close side panel."
onClicked: {
sidePanel.close()

View file

@ -24,7 +24,7 @@ NBox {
NCircleStat {
value: SystemStatService.cpuUsage
icon: FontService.icons["speed"]
icon: Bootstrap.icons["speed"]
flat: true
contentScale: 0.8
width: 72 * scaling
@ -33,7 +33,7 @@ NBox {
NCircleStat {
value: SystemStatService.cpuTemp
suffix: "°C"
icon: FontService.icons["thermometer"]
icon: Bootstrap.icons["thermometer"]
flat: true
contentScale: 0.8
width: 72 * scaling
@ -41,7 +41,7 @@ NBox {
}
NCircleStat {
value: SystemStatService.memPercent
icon: FontService.icons["memory"]
icon: Bootstrap.icons["memory"]
flat: true
contentScale: 0.8
width: 72 * scaling
@ -49,7 +49,7 @@ NBox {
}
NCircleStat {
value: SystemStatService.diskPercent
icon: FontService.icons["drive"]
icon: Bootstrap.icons["drive"]
flat: true
contentScale: 0.8
width: 72 * scaling

View file

@ -25,7 +25,7 @@ NBox {
}
// Screen Recorder
NIconButton {
icon: FontService.icons["video_camera"]
icon: Bootstrap.icons["video_camera"]
tooltipText: ScreenRecorderService.isRecording ? "Stop screen recording." : "Start screen recording."
colorBg: ScreenRecorderService.isRecording ? Color.mPrimary : Color.mSurfaceVariant
colorFg: ScreenRecorderService.isRecording ? Color.mOnPrimary : Color.mPrimary
@ -41,7 +41,7 @@ NBox {
// Idle Inhibitor
NIconButton {
icon: FontService.icons["coffee"]
icon: Bootstrap.icons["coffee"]
tooltipText: IdleInhibitorService.isInhibited ? "Disable keep awake." : "Enable keep awake."
colorBg: IdleInhibitorService.isInhibited ? Color.mPrimary : Color.mSurfaceVariant
colorFg: IdleInhibitorService.isInhibited ? Color.mOnPrimary : Color.mPrimary
@ -53,7 +53,7 @@ NBox {
// Wallpaper
NIconButton {
visible: Settings.data.wallpaper.enabled
icon: FontService.icons["image"]
icon: Bootstrap.icons["image"]
tooltipText: "Left click: Open wallpaper selector.\nRight click: Set random wallpaper."
onClicked: {
var settingsPanel = PanelService.getPanel("settingsPanel")