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
|
||||||
|
import QtQuick.Effects
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import Quickshell
|
import Quickshell
|
||||||
@ -153,29 +154,50 @@ Item {
|
|||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
spacing: 12
|
spacing: 12
|
||||||
|
|
||||||
Rectangle {
|
// User Avatar Container (Pure Circle with Mask & Breathing Ring)
|
||||||
|
Item {
|
||||||
width: 96
|
width: 96
|
||||||
height: 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
|
radius: 48
|
||||||
color: Qt.rgba(Theme.accent.r, Theme.accent.g, Theme.accent.b, 0.15)
|
color: Qt.rgba(Theme.accent.r, Theme.accent.g, Theme.accent.b, 0.15)
|
||||||
border.color: Theme.accent
|
border.color: Theme.accent
|
||||||
border.width: 2
|
border.width: 2
|
||||||
Layout.alignment: Qt.AlignHCenter
|
}
|
||||||
|
|
||||||
clip: true
|
// Profile Image masked to 100% pure circle
|
||||||
|
|
||||||
// Profile Picture from KDE Settings / AccountsService
|
|
||||||
Image {
|
Image {
|
||||||
id: avatarImg
|
id: avatarImg
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
anchors.margins: 2
|
||||||
source: LockscreenService.avatarPath
|
source: LockscreenService.avatarPath
|
||||||
fillMode: Image.PreserveAspectCrop
|
fillMode: Image.PreserveAspectCrop
|
||||||
visible: status === Image.Ready && source !== ""
|
visible: status === Image.Ready && source !== ""
|
||||||
smooth: true
|
smooth: true
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
|
layer.enabled: true
|
||||||
|
layer.effect: MultiEffect {
|
||||||
|
maskEnabled: true
|
||||||
|
maskSource: avatarMask
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Avatar Icon / Initial Badge (Fallback)
|
// Initial Letter Fallback
|
||||||
Text {
|
Text {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
visible: !avatarImg.visible
|
visible: !avatarImg.visible
|
||||||
@ -185,7 +207,7 @@ Item {
|
|||||||
font.weight: Font.Bold
|
font.weight: Font.Bold
|
||||||
}
|
}
|
||||||
|
|
||||||
// Breathing Glow Ring
|
// Breathing Glow Ring (Outside container, true 104px circle)
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: -4
|
anchors.margins: -4
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user