fix(lockscreen): mask user avatar to pure 100% smooth circle via MultiEffect and terminate stale systemsettings process
This commit is contained in:
parent
01b9d4ba4e
commit
714284f5fe
@ -1,4 +1,5 @@
|
||||
import QtQuick
|
||||
import QtQuick.Effects
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import Quickshell
|
||||
@ -153,29 +154,50 @@ Item {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
spacing: 12
|
||||
|
||||
Rectangle {
|
||||
// User Avatar Container (Pure Circle with Mask & Breathing Ring)
|
||||
Item {
|
||||
width: 96
|
||||
height: 96
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
|
||||
// Mask Item for Avatar Image Rounding
|
||||
Rectangle {
|
||||
id: avatarMask
|
||||
anchors.fill: parent
|
||||
radius: 48
|
||||
color: "#ffffff"
|
||||
visible: false
|
||||
layer.enabled: true
|
||||
}
|
||||
|
||||
// Main Circular Background & Border
|
||||
Rectangle {
|
||||
id: avatarCircle
|
||||
anchors.fill: parent
|
||||
radius: 48
|
||||
color: Qt.rgba(Theme.accent.r, Theme.accent.g, Theme.accent.b, 0.15)
|
||||
border.color: Theme.accent
|
||||
border.width: 2
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
}
|
||||
|
||||
clip: true
|
||||
|
||||
// Profile Picture from KDE Settings / AccountsService
|
||||
// Profile Image masked to 100% pure circle
|
||||
Image {
|
||||
id: avatarImg
|
||||
anchors.fill: parent
|
||||
anchors.margins: 2
|
||||
source: LockscreenService.avatarPath
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
visible: status === Image.Ready && source !== ""
|
||||
smooth: true
|
||||
asynchronous: true
|
||||
layer.enabled: true
|
||||
layer.effect: MultiEffect {
|
||||
maskEnabled: true
|
||||
maskSource: avatarMask
|
||||
}
|
||||
}
|
||||
|
||||
// Avatar Icon / Initial Badge (Fallback)
|
||||
// Initial Letter Fallback
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
visible: !avatarImg.visible
|
||||
@ -185,7 +207,7 @@ Item {
|
||||
font.weight: Font.Bold
|
||||
}
|
||||
|
||||
// Breathing Glow Ring
|
||||
// Breathing Glow Ring (Outside container, true 104px circle)
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.margins: -4
|
||||
|
||||
Loading…
Reference in New Issue
Block a user