More icons work

This commit is contained in:
LemmyCook 2025-09-09 18:10:25 -04:00
parent ca7684c944
commit a38f49cb35
9 changed files with 47 additions and 40 deletions

View file

@ -10,9 +10,11 @@ Singleton {
readonly property var aliases: {
"close": "x",
"check": "checks",
"check": "check",
"settings": "settings",
"add": "plus",
"circle-check": "circle-check",
"exclamation-circle": "exclamation-circle",
"media-pause": "player-pause",
"media-play": "player-play",
"media-prev": "player-track-prev",
@ -37,8 +39,10 @@ Singleton {
"wifi-2": "wifi-2",
"wifi-off": "wifi-off",
"wifi": "wifi",
"nightlight-on": "moon",
"nightlight-on": "moon-filled",
"nightlight-off": "moon-off",
"bell": "bell-filled",
"bell-off": "bell-off",
"keep-awake-on": "mug",
"keep-awake-off": "mug-off",
"panel": "layout-sidebar-right-inactive",
@ -50,6 +54,28 @@ Singleton {
"chevron-right": "chevron-right",
"chevron-up": "chevron-up",
"chevron-down": "chevron-down",
"battery-exclamation": "battery-exclamation",
"battery-charging": "battery-charging",
"battery-4": "battery-4",
"battery-3": "battery-3",
"battery-2": "battery-2",
"battery-1": "battery-1",
"battery": "battery",
"microphone": "microphone",
"microphone-mute": "microphone-off",
"volume-mute": "volume-off",
"volume-zero": "volume-3",
"volume-low": "volume-2",
"volume-high": "volume",
"weather-sun": "sun-filled",
"weather-cloud-sun": "sun",
"weather-cloud": "cloud",
"weather-cloud-haze": "cloud-rain",
"weather-cloud-rain": "cloud-rain",
"weather-cloud-snow": "cloud-snow",
"weather-cloud-lightning": "cloud-bolt",
"brightness-low": "brightness-down",
"brightness-high": "brightness-up",
"settings-general": "box",
"settings-bar": "line-dashed",
"settings-launcher": "rocket",
@ -63,28 +89,8 @@ Singleton {
"settings-wallpaper-selector": "library-photo",
"settings-screen-recorder": "video",
"settings-hooks": "link",
"settings-about": "info-square-rounded",
"microphone": "microphone",
"microphone-mute": "microphone-off",
"volume-mute": "volume-off",
"volume-zero": "volume-3",
"volume-low": "volume-2",
"volume-high": "volume",
"weather-sun": "sun-filled",
"weather-cloud-sun": "sun",
"weather-cloud": "cloud",
"weather-cloud-haze": "cloud-rain",
"weather-cloud-rain": "cloud-rain",
"weather-cloud-snow": "cloud-snow",
"weather-cloud-lightning": "cloud-bolt",
// TODO BRIGHTNESS
"settings-about": "info-square-rounded"
// TODO BT DEVICES
// TODO VOLUME
}
readonly property var icons: {

View file

@ -37,8 +37,8 @@ Item {
!== undefined ? widgetSettings.warningThreshold : widgetMetadata.warningThreshold
// Test mode
readonly property bool testMode: false
readonly property int testPercent: 50
readonly property bool testMode: true
readonly property int testPercent: 90
readonly property bool testCharging: false
// Main properties

View file

@ -13,14 +13,13 @@ NIconButton {
property ShellScreen screen
property real scaling: 1.0
visible: Settings.data.network.bluetoothEnabled
sizeRatio: 0.8
colorBg: Color.mSurfaceVariant
colorFg: Color.mOnSurface
colorBorder: Color.transparent
colorBorderHover: Color.transparent
icon: "bluetooth"
tooltipText: "Bluetooth"
icon: Settings.data.network.bluetoothEnabled ? "bluetooth" : "bluetooth-off"
tooltipText: "Bluetooth devices."
onClicked: PanelService.getPanel("bluetoothPanel")?.toggle(screen, this)
}

View file

@ -45,7 +45,7 @@ Item {
if (AudioService.inputMuted) {
return "microphone-mute"
}
return (AudioService.inputVolume <= Number.EPSILON)? "microphone-mute" : "microphone"
return (AudioService.inputVolume <= Number.EPSILON) ? "microphone-mute" : "microphone"
}
// Connection used to open the pill when input volume changes

View file

@ -53,7 +53,7 @@ NIconButton {
}
sizeRatio: 0.8
icon: Settings.data.notifications.doNotDisturb ? "bell-slash" : "bell"
icon: Settings.data.notifications.doNotDisturb ? "bell-off" : "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

@ -45,10 +45,11 @@ NPanel {
}
NIconButton {
icon: Settings.data.notifications.doNotDisturb ? "bell-slash" : "bell"
icon: Settings.data.notifications.doNotDisturb ? "bell-off" : "bell"
tooltipText: Settings.data.notifications.doNotDisturb ? "'Do Not Disturb' is enabled." : "'Do Not Disturb' is disabled."
sizeRatio: 0.8
onClicked: Settings.data.notifications.doNotDisturb = !Settings.data.notifications.doNotDisturb
onRightClicked: Settings.data.notifications.doNotDisturb = !Settings.data.notifications.doNotDisturb
}
NIconButton {

View file

@ -91,7 +91,7 @@ NPanel {
spacing: Style.marginS * scaling
NIcon {
icon: "exclamation-triangle"
icon: "exclamation-circle"
font.pointSize: Style.fontSizeL * scaling
color: Color.mError
}

View file

@ -11,20 +11,21 @@ Singleton {
// Choose icon based on charge and charging state
function getIcon(percent, charging, isReady) {
if (!isReady) {
return "exclamation-triangle"
return "battery-exclamation"
}
if (charging) {
return "battery-charging"
} else {
if (percent >= 85)
return "battery-full"
if (percent >= 45)
return "battery-half"
if (percent >= 90)
return "battery-4"
if (percent >= 50)
return "battery-3"
if (percent >= 25)
return "battery-low"
return "battery-2"
if (percent >= 0)
return "battery"
return "battery-1"
return "battery"
}
}
}

View file

@ -118,7 +118,7 @@ Item {
// Icon
NIcon {
id: icon
icon: (root.type == "warning") ? "exclamation-triangle" : "check-circle"
icon: (root.type == "warning") ? "exclamation-circle" : "circle-check"
color: {
switch (root.type) {
case "warning":