volume icons

This commit is contained in:
LemmyCook 2025-09-08 13:55:48 -04:00
parent 242ae17d0a
commit 6f4a4bb764
5 changed files with 25 additions and 16 deletions

View file

@ -53,7 +53,7 @@ NIconButton {
} }
sizeRatio: 0.8 sizeRatio: 0.8
icon: Settings.data.notifications.doNotDisturb ? "notifications_off" : "notifications" icon: Settings.data.notifications.doNotDisturb ? FontService.icons["bell_striked"] : FontService.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'." 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 colorBg: Color.mSurfaceVariant
colorFg: Settings.data.notifications.doNotDisturb ? Color.mError : Color.mOnSurface colorFg: Settings.data.notifications.doNotDisturb ? Color.mError : Color.mOnSurface

View file

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

View file

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

View file

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

View file

@ -14,7 +14,6 @@ Singleton {
property bool fontsLoaded: false property bool fontsLoaded: false
property var icons: { property var icons: {
// weather
"sunny": "\ue30d", "sunny": "\ue30d",
"partly_cloudy": "\ue302", "partly_cloudy": "\ue302",
"cloud": "\ue312", "cloud": "\ue312",
@ -22,17 +21,27 @@ Singleton {
"rainy": "\ue318", "rainy": "\ue318",
"snowy": "\ue319", "snowy": "\ue319",
"thunderstom": "\ue31d", "thunderstom": "\ue31d",
"battery_empty": "\uF188",
"power": "\uf011", "battery_low": "\uF187",
"gear": "\uf013", "battery_full": "\uF186",
"battery_charging": "\uF185",
"volume_off": "\uF026",
"volume_half": "\uF027",
"volume_full": "\uF028",
"power": "\uf011",
"gear": "\uf013",
"close": "\uf00D", "close": "\uf00D",
"check": "\uf00C", "check": "\uf00C",
"panel": "\uF00B" "panel": "\uF28C",
"memory": "\uF2D6",
"bell": "\uF189",
"trash": "\uF014",
"image": "\uF03E",
"refresh": "\uF021",
"video_camera": "\uF03D",
} }
// ------------------------------------------- // -------------------------------------------
function init() { function init() {
Logger.log("Font", "Service started") Logger.log("Font", "Service started")
loadSystemFonts() loadSystemFonts()