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

View file

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

View file

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

View file

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

View file

@ -45,7 +45,7 @@ Item {
if (AudioService.muted) {
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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -56,7 +56,7 @@ NBox {
// Wallpaper
NIconButton {
visible: Settings.data.wallpaper.enabled
icon: "image"
icon: "wallpaper-selector"
tooltipText: "Left click: Open wallpaper selector.\nRight click: Set random wallpaper."
onClicked: {
var settingsPanel = PanelService.getPanel("settingsPanel")

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -48,7 +48,7 @@ Rectangle {
NIcon {
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
// Center horizontally
x: (root.width - width) / 2