More icons work
This commit is contained in:
parent
ca7684c944
commit
a38f49cb35
9 changed files with 47 additions and 40 deletions
|
|
@ -10,9 +10,11 @@ Singleton {
|
||||||
|
|
||||||
readonly property var aliases: {
|
readonly property var aliases: {
|
||||||
"close": "x",
|
"close": "x",
|
||||||
"check": "checks",
|
"check": "check",
|
||||||
"settings": "settings",
|
"settings": "settings",
|
||||||
"add": "plus",
|
"add": "plus",
|
||||||
|
"circle-check": "circle-check",
|
||||||
|
"exclamation-circle": "exclamation-circle",
|
||||||
"media-pause": "player-pause",
|
"media-pause": "player-pause",
|
||||||
"media-play": "player-play",
|
"media-play": "player-play",
|
||||||
"media-prev": "player-track-prev",
|
"media-prev": "player-track-prev",
|
||||||
|
|
@ -37,8 +39,10 @@ Singleton {
|
||||||
"wifi-2": "wifi-2",
|
"wifi-2": "wifi-2",
|
||||||
"wifi-off": "wifi-off",
|
"wifi-off": "wifi-off",
|
||||||
"wifi": "wifi",
|
"wifi": "wifi",
|
||||||
"nightlight-on": "moon",
|
"nightlight-on": "moon-filled",
|
||||||
"nightlight-off": "moon-off",
|
"nightlight-off": "moon-off",
|
||||||
|
"bell": "bell-filled",
|
||||||
|
"bell-off": "bell-off",
|
||||||
"keep-awake-on": "mug",
|
"keep-awake-on": "mug",
|
||||||
"keep-awake-off": "mug-off",
|
"keep-awake-off": "mug-off",
|
||||||
"panel": "layout-sidebar-right-inactive",
|
"panel": "layout-sidebar-right-inactive",
|
||||||
|
|
@ -50,6 +54,28 @@ Singleton {
|
||||||
"chevron-right": "chevron-right",
|
"chevron-right": "chevron-right",
|
||||||
"chevron-up": "chevron-up",
|
"chevron-up": "chevron-up",
|
||||||
"chevron-down": "chevron-down",
|
"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-general": "box",
|
||||||
"settings-bar": "line-dashed",
|
"settings-bar": "line-dashed",
|
||||||
"settings-launcher": "rocket",
|
"settings-launcher": "rocket",
|
||||||
|
|
@ -63,28 +89,8 @@ Singleton {
|
||||||
"settings-wallpaper-selector": "library-photo",
|
"settings-wallpaper-selector": "library-photo",
|
||||||
"settings-screen-recorder": "video",
|
"settings-screen-recorder": "video",
|
||||||
"settings-hooks": "link",
|
"settings-hooks": "link",
|
||||||
"settings-about": "info-square-rounded",
|
"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
|
|
||||||
// TODO BT DEVICES
|
// TODO BT DEVICES
|
||||||
// TODO VOLUME
|
|
||||||
}
|
}
|
||||||
|
|
||||||
readonly property var icons: {
|
readonly property var icons: {
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,8 @@ Item {
|
||||||
!== undefined ? widgetSettings.warningThreshold : widgetMetadata.warningThreshold
|
!== undefined ? widgetSettings.warningThreshold : widgetMetadata.warningThreshold
|
||||||
|
|
||||||
// Test mode
|
// Test mode
|
||||||
readonly property bool testMode: false
|
readonly property bool testMode: true
|
||||||
readonly property int testPercent: 50
|
readonly property int testPercent: 90
|
||||||
readonly property bool testCharging: false
|
readonly property bool testCharging: false
|
||||||
|
|
||||||
// Main properties
|
// Main properties
|
||||||
|
|
|
||||||
|
|
@ -13,14 +13,13 @@ NIconButton {
|
||||||
property ShellScreen screen
|
property ShellScreen screen
|
||||||
property real scaling: 1.0
|
property real scaling: 1.0
|
||||||
|
|
||||||
visible: Settings.data.network.bluetoothEnabled
|
|
||||||
sizeRatio: 0.8
|
sizeRatio: 0.8
|
||||||
colorBg: Color.mSurfaceVariant
|
colorBg: Color.mSurfaceVariant
|
||||||
colorFg: Color.mOnSurface
|
colorFg: Color.mOnSurface
|
||||||
colorBorder: Color.transparent
|
colorBorder: Color.transparent
|
||||||
colorBorderHover: Color.transparent
|
colorBorderHover: Color.transparent
|
||||||
|
|
||||||
icon: "bluetooth"
|
icon: Settings.data.network.bluetoothEnabled ? "bluetooth" : "bluetooth-off"
|
||||||
tooltipText: "Bluetooth"
|
tooltipText: "Bluetooth devices."
|
||||||
onClicked: PanelService.getPanel("bluetoothPanel")?.toggle(screen, this)
|
onClicked: PanelService.getPanel("bluetoothPanel")?.toggle(screen, this)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ Item {
|
||||||
if (AudioService.inputMuted) {
|
if (AudioService.inputMuted) {
|
||||||
return "microphone-mute"
|
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
|
// Connection used to open the pill when input volume changes
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ NIconButton {
|
||||||
}
|
}
|
||||||
|
|
||||||
sizeRatio: 0.8
|
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'."
|
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: Color.mOnSurface
|
colorFg: Color.mOnSurface
|
||||||
|
|
|
||||||
|
|
@ -45,10 +45,11 @@ NPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
NIconButton {
|
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."
|
tooltipText: Settings.data.notifications.doNotDisturb ? "'Do Not Disturb' is enabled." : "'Do Not Disturb' is disabled."
|
||||||
sizeRatio: 0.8
|
sizeRatio: 0.8
|
||||||
onClicked: Settings.data.notifications.doNotDisturb = !Settings.data.notifications.doNotDisturb
|
onClicked: Settings.data.notifications.doNotDisturb = !Settings.data.notifications.doNotDisturb
|
||||||
|
onRightClicked: Settings.data.notifications.doNotDisturb = !Settings.data.notifications.doNotDisturb
|
||||||
}
|
}
|
||||||
|
|
||||||
NIconButton {
|
NIconButton {
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ NPanel {
|
||||||
spacing: Style.marginS * scaling
|
spacing: Style.marginS * scaling
|
||||||
|
|
||||||
NIcon {
|
NIcon {
|
||||||
icon: "exclamation-triangle"
|
icon: "exclamation-circle"
|
||||||
font.pointSize: Style.fontSizeL * scaling
|
font.pointSize: Style.fontSizeL * scaling
|
||||||
color: Color.mError
|
color: Color.mError
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,20 +11,21 @@ Singleton {
|
||||||
// Choose icon based on charge and charging state
|
// Choose icon based on charge and charging state
|
||||||
function getIcon(percent, charging, isReady) {
|
function getIcon(percent, charging, isReady) {
|
||||||
if (!isReady) {
|
if (!isReady) {
|
||||||
return "exclamation-triangle"
|
return "battery-exclamation"
|
||||||
}
|
}
|
||||||
|
|
||||||
if (charging) {
|
if (charging) {
|
||||||
return "battery-charging"
|
return "battery-charging"
|
||||||
} else {
|
} else {
|
||||||
if (percent >= 85)
|
if (percent >= 90)
|
||||||
return "battery-full"
|
return "battery-4"
|
||||||
if (percent >= 45)
|
if (percent >= 50)
|
||||||
return "battery-half"
|
return "battery-3"
|
||||||
if (percent >= 25)
|
if (percent >= 25)
|
||||||
return "battery-low"
|
return "battery-2"
|
||||||
if (percent >= 0)
|
if (percent >= 0)
|
||||||
return "battery"
|
return "battery-1"
|
||||||
|
return "battery"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ Item {
|
||||||
// Icon
|
// Icon
|
||||||
NIcon {
|
NIcon {
|
||||||
id: icon
|
id: icon
|
||||||
icon: (root.type == "warning") ? "exclamation-triangle" : "check-circle"
|
icon: (root.type == "warning") ? "exclamation-circle" : "circle-check"
|
||||||
color: {
|
color: {
|
||||||
switch (root.type) {
|
switch (root.type) {
|
||||||
case "warning":
|
case "warning":
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue