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
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'."
colorBg: Color.mSurfaceVariant
colorFg: Settings.data.notifications.doNotDisturb ? Color.mError : Color.mOnSurface

View file

@ -43,9 +43,9 @@ Item {
function getIcon() {
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

View file

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

View file

@ -25,7 +25,7 @@ NBox {
}
// Screen Recorder
NIconButton {
icon: "videocam"
icon: FontService.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: "coffee"
icon: FontService.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: "image"
icon: FontService.icons["image"]
tooltipText: "Left click: Open wallpaper selector.\nRight click: Set random wallpaper."
onClicked: {
var settingsPanel = PanelService.getPanel("settingsPanel")

View file

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