Replaced Image {} per IconImage {} where applicable

This commit is contained in:
Sébastien Atoch 2025-08-03 08:49:03 -04:00
parent e2d02afc9a
commit 2f14dba144
13 changed files with 69 additions and 127 deletions

View file

@ -4,6 +4,7 @@ import QtQuick.Controls
import Qt5Compat.GraphicalEffects
import Quickshell
import Quickshell.Io
import Quickshell.Widgets
import qs.Settings
import qs.Widgets
import qs.Widgets.LockScreen
@ -51,38 +52,7 @@ Rectangle {
z: 2
}
OpacityMask {
anchors.fill: parent
source: Image {
id: avatarImage
anchors.fill: parent
source: Settings.settings.profileImage !== undefined ? Settings.settings.profileImage : ""
fillMode: Image.PreserveAspectCrop
asynchronous: true
cache: false
smooth: true
mipmap: true
}
maskSource: Rectangle {
width: 44
height: 44
radius: 22
visible: false
}
visible: Settings.settings.profileImage !== undefined && Settings.settings.profileImage !== ""
z: 1
}
// Fallback icon
Text {
anchors.centerIn: parent
text: "person"
font.family: "Material Symbols Outlined"
font.pixelSize: 24
color: Theme.onAccent
visible: Settings.settings.profileImage === undefined || Settings.settings.profileImage === ""
z: 0
}
Avatar {}
}
// User info text

View file

@ -136,12 +136,9 @@ PanelWindow {
source: modelData
fillMode: Image.PreserveAspectCrop
asynchronous: true
cache: false
cache: true
smooth: true
mipmap: true
// Limit memory usage
sourceSize.width: Math.min(width, 480)
sourceSize.height: Math.min(height, 270)
}
MouseArea {
anchors.fill: parent