More icons work

This commit is contained in:
LemmyCook 2025-09-09 17:34:14 -04:00
parent 48f6c0705b
commit 955369ab13
17 changed files with 55 additions and 33 deletions

View file

@ -10,6 +10,7 @@ Singleton {
readonly property var aliases: { readonly property var aliases: {
"close": "x", "close": "x",
"check": "checks",
"settings": "settings", "settings": "settings",
"add": "plus", "add": "plus",
"media-pause": "player-pause", "media-pause": "player-pause",
@ -21,7 +22,7 @@ Singleton {
"cpu-temperature": "flame", "cpu-temperature": "flame",
"memory": "cpu", "memory": "cpu",
"performance": "brand-speedtest", "performance": "brand-speedtest",
"balanced": "brand-speedtest", "balanced": "scale",
"powersaver": "leaf", "powersaver": "leaf",
"download-speed": "download", "download-speed": "download",
"upload-speed": "upload", "upload-speed": "upload",
@ -43,6 +44,8 @@ Singleton {
"panel": "layout-sidebar-right-inactive", "panel": "layout-sidebar-right-inactive",
"dark-mode": "contrast", "dark-mode": "contrast",
"camera-video": "video", "camera-video": "video",
"wallpaper-selector": "library-photo",
"color-picker": "color-picker",
"chevron-left": "chevron-left", "chevron-left": "chevron-left",
"chevron-right": "chevron-right", "chevron-right": "chevron-right",
"chevron-up": "chevron-up", "chevron-up": "chevron-up",
@ -62,8 +65,26 @@ Singleton {
"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 BRIGHTNESS
// TODO BT DEVICES // TODO BT DEVICES
// TODO VOLUME
} }
readonly property var icons: { readonly property var icons: {

View file

@ -323,7 +323,7 @@ NPanel {
spacing: Style.marginM * scaling spacing: Style.marginM * scaling
NIcon { NIcon {
icon: "check-lg" icon: "check"
font.pointSize: Style.fontSizeXXXL * scaling font.pointSize: Style.fontSizeXXXL * scaling
color: Color.mPrimary color: Color.mPrimary
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter

View file

@ -43,9 +43,9 @@ Item {
function getIcon() { function getIcon() {
if (AudioService.inputMuted) { if (AudioService.inputMuted) {
return "mic-mute" return "microphone-mute"
} }
return AudioService.inputVolume <= Number.EPSILON ? "mic-mute" : (AudioService.inputVolume < 0.33 ? "mic" : "mic") 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

View file

@ -46,8 +46,8 @@ NIconButton {
icon: root.profileIcon() icon: root.profileIcon()
tooltipText: root.profileName() tooltipText: root.profileName()
colorBg: Color.mSurfaceVariant colorBg: (PowerProfileService.profile === PowerProfile.Balanced) ? Color.mSurfaceVariant : Color.mPrimary
colorFg: Color.mOnSurface colorFg: (PowerProfileService.profile === PowerProfile.Balanced) ? Color.mOnSurface : Color.mOnPrimary
colorBorder: Color.transparent colorBorder: Color.transparent
colorBorderHover: Color.transparent colorBorderHover: Color.transparent
onClicked: root.changeProfile() onClicked: root.changeProfile()

View file

@ -45,7 +45,7 @@ Item {
if (AudioService.muted) { if (AudioService.muted) {
return "volume-mute" return "volume-mute"
} }
return AudioService.volume <= 0.2 ? "volume-off" : (AudioService.volume < 0.6 ? "volume-down" : "volume-up") return (AudioService.volume <= Number.EPSILON) ? "volume-zero" : (AudioService.volume <= 0.5) ? "volume-low" : "volume-high"
} }
// Connection used to open the pill when volume changes // Connection used to open the pill when volume changes

View file

@ -121,7 +121,7 @@ Popup {
NButton { NButton {
text: "Apply" text: "Apply"
icon: "check-lg" icon: "check"
onClicked: { onClicked: {
if (settingsLoader.item && settingsLoader.item.saveSettings) { if (settingsLoader.item && settingsLoader.item.saveSettings) {
var newSettings = settingsLoader.item.saveSettings() var newSettings = settingsLoader.item.saveSettings()

View file

@ -195,7 +195,7 @@ ColumnLayout {
} }
NButton { NButton {
text: "Apply" text: "Apply"
icon: "check-lg" icon: "check"
enabled: iconPicker.selectedIcon !== "" enabled: iconPicker.selectedIcon !== ""
onClicked: { onClicked: {
iconInput.text = iconPicker.selectedIcon iconInput.text = iconPicker.selectedIcon

View file

@ -90,7 +90,7 @@ ColumnLayout {
spacing: Style.marginS * scaling spacing: Style.marginS * scaling
NIcon { NIcon {
text: "download" icon: "download"
font.pointSize: Style.fontSizeXXL * scaling font.pointSize: Style.fontSizeXXL * scaling
color: updateArea.containsMouse ? Color.mSurface : Color.mPrimary color: updateArea.containsMouse ? Color.mSurface : Color.mPrimary
} }

View file

@ -181,7 +181,7 @@ ColumnLayout {
visible: isSelected visible: isSelected
NIcon { NIcon {
icon: "check-lg" icon: "check"
font.pointSize: Style.fontSizeM * scaling font.pointSize: Style.fontSizeM * scaling
font.weight: Style.fontWeightBold font.weight: Style.fontWeightBold
color: Color.mOnSecondary color: Color.mOnSecondary
@ -246,7 +246,7 @@ ColumnLayout {
} }
NIcon { NIcon {
text: "folder_open" icon: "folder-open"
font.pointSize: Style.fontSizeXL * scaling font.pointSize: Style.fontSizeXL * scaling
color: Color.mOnSurface color: Color.mOnSurface
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter

View file

@ -49,7 +49,7 @@ NBox {
} }
NCircleStat { NCircleStat {
value: SystemStatService.diskPercent value: SystemStatService.diskPercent
icon: "hdd" icon: "storage"
flat: true flat: true
contentScale: 0.8 contentScale: 0.8
width: 72 * scaling width: 72 * scaling

View file

@ -56,7 +56,7 @@ NBox {
// Wallpaper // Wallpaper
NIconButton { NIconButton {
visible: Settings.data.wallpaper.enabled visible: Settings.data.wallpaper.enabled
icon: "image" icon: "wallpaper-selector"
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

@ -90,21 +90,23 @@ NBox {
model: weatherReady ? LocationService.data.weather.daily.time : [] model: weatherReady ? LocationService.data.weather.daily.time : []
delegate: ColumnLayout { delegate: ColumnLayout {
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
spacing: Style.marginS * scaling spacing: Style.marginL * scaling
NText { NText {
text: { text: {
var weatherDate = new Date(LocationService.data.weather.daily.time[index].replace(/-/g, "/")) var weatherDate = new Date(LocationService.data.weather.daily.time[index].replace(/-/g, "/"))
return Qt.formatDateTime(weatherDate, "ddd") return Qt.formatDateTime(weatherDate, "ddd")
} }
color: Color.mOnSurface color: Color.mOnSurface
Layout.alignment: Qt.AlignHCenter
} }
NIcon { NIcon {
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
icon: LocationService.weatherSymbolFromCode(LocationService.data.weather.daily.weathercode[index]) icon: LocationService.weatherSymbolFromCode(LocationService.data.weather.daily.weathercode[index])
font.pointSize: Style.fontSizeXXL * scaling font.pointSize: Style.fontSizeXXL * 1.6 * scaling
color: Color.mPrimary color: Color.mPrimary
} }
NText { NText {
Layout.alignment: Qt.AlignHCenter
text: { text: {
var max = LocationService.data.weather.daily.temperature_2m_max[index] var max = LocationService.data.weather.daily.temperature_2m_max[index]
var min = LocationService.data.weather.daily.temperature_2m_min[index] var min = LocationService.data.weather.daily.temperature_2m_min[index]

View file

@ -231,24 +231,24 @@ Singleton {
// -------------------------------- // --------------------------------
function weatherSymbolFromCode(code) { function weatherSymbolFromCode(code) {
if (code === 0) if (code === 0)
return "sun" return "weather-sun"
if (code === 1 || code === 2) if (code === 1 || code === 2)
return "cloud-sun" return "weather-cloud-sun"
if (code === 3) if (code === 3)
return "cloud" return "weather-cloud"
if (code >= 45 && code <= 48) if (code >= 45 && code <= 48)
return "cloud-haze" return "weather-cloud-haze"
if (code >= 51 && code <= 67) if (code >= 51 && code <= 67)
return "cloud-rain" return "weather-cloud-rain"
if (code >= 71 && code <= 77) if (code >= 71 && code <= 77)
return "cloud-snow" return "weather-cloud-snow"
if (code >= 71 && code <= 77) if (code >= 71 && code <= 77)
return "cloud-snow" return "weather-cloud-snow"
if (code >= 85 && code <= 86) if (code >= 85 && code <= 86)
return "cloud-snow" return "weather-cloud-snow"
if (code >= 95 && code <= 99) if (code >= 95 && code <= 99)
return "cloud-lightning" return "weather-cloud-lightning"
return "cloud" return "weather-cloud"
} }
// -------------------------------- // --------------------------------

View file

@ -57,7 +57,7 @@ RowLayout {
NIcon { NIcon {
visible: root.checked visible: root.checked
anchors.centerIn: parent anchors.centerIn: parent
icon: "check-lg" icon: "check"
color: root.activeOnColor color: root.activeOnColor
font.pointSize: Math.max(Style.fontSizeS, root.baseSize * 0.7) * scaling font.pointSize: Math.max(Style.fontSizeS, root.baseSize * 0.7) * scaling
} }

View file

@ -59,7 +59,7 @@ Rectangle {
} }
NIcon { NIcon {
icon: "paint-bucket" icon: "color-picker"
color: Color.mOnSurfaceVariant color: Color.mOnSurfaceVariant
} }
} }

View file

@ -130,7 +130,7 @@ Popup {
spacing: Style.marginS * scaling spacing: Style.marginS * scaling
NIcon { NIcon {
icon: "eyedropper" icon: "color-picker"
font.pointSize: Style.fontSizeXXL * scaling font.pointSize: Style.fontSizeXXL * scaling
color: Color.mPrimary color: Color.mPrimary
} }
@ -492,7 +492,6 @@ Popup {
NButton { NButton {
id: cancelButton id: cancelButton
text: "Cancel" text: "Cancel"
icon: "close"
outlined: cancelButton.hovered ? false : true outlined: cancelButton.hovered ? false : true
customHeight: 36 * scaling customHeight: 36 * scaling
customWidth: 100 * scaling customWidth: 100 * scaling
@ -503,7 +502,7 @@ Popup {
NButton { NButton {
text: "Apply" text: "Apply"
icon: "check-lg" icon: "check"
customHeight: 36 * scaling customHeight: 36 * scaling
customWidth: 100 * scaling customWidth: 100 * scaling
onClicked: { onClicked: {

View file

@ -48,7 +48,7 @@ Rectangle {
NIcon { NIcon {
icon: root.icon icon: root.icon
font.pointSize: Math.max(1, root.width * 0.5) font.pointSize: Math.max(1, root.width * 0.47)
color: root.enabled && root.hovering ? colorFgHover : colorFg color: root.enabled && root.hovering ? colorFgHover : colorFg
// Center horizontally // Center horizontally
x: (root.width - width) / 2 x: (root.width - width) / 2