Merge branch 'Ly-sec:main' into main
This commit is contained in:
commit
59d7d6292a
15 changed files with 78 additions and 118 deletions
|
|
@ -2,6 +2,8 @@ import QtQuick
|
|||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import Quickshell.Widgets
|
||||
import qs.Components
|
||||
import qs.Settings
|
||||
|
||||
Rectangle {
|
||||
|
|
@ -61,39 +63,7 @@ Rectangle {
|
|||
border.color: profileImageInput.activeFocus ? Theme.accentPrimary : Theme.outline
|
||||
border.width: 1
|
||||
|
||||
Image {
|
||||
id: avatarImage
|
||||
anchors.fill: parent
|
||||
anchors.margins: 2
|
||||
source: Settings.settings.profileImage
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
visible: false
|
||||
asynchronous: true
|
||||
cache: false
|
||||
sourceSize.width: 64
|
||||
sourceSize.height: 64
|
||||
}
|
||||
|
||||
OpacityMask {
|
||||
anchors.fill: avatarImage
|
||||
source: avatarImage
|
||||
maskSource: Rectangle {
|
||||
width: avatarImage.width
|
||||
height: avatarImage.height
|
||||
radius: avatarImage.width / 2
|
||||
visible: false
|
||||
}
|
||||
visible: Settings.settings.profileImage !== ""
|
||||
}
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: "person"
|
||||
font.family: "Material Symbols Outlined"
|
||||
font.pixelSize: 20
|
||||
color: Theme.accentPrimary
|
||||
visible: Settings.settings.profileImage === ""
|
||||
}
|
||||
Avatar {}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ Rectangle {
|
|||
anchors.margins: 2
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
smooth: true
|
||||
mipmap: true
|
||||
cache: false
|
||||
asynchronous: true
|
||||
sourceSize.width: 60
|
||||
|
|
|
|||
|
|
@ -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
|
||||
sourceSize.width: 44
|
||||
sourceSize.height: 44
|
||||
}
|
||||
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
|
||||
|
|
|
|||
|
|
@ -137,8 +137,11 @@ PanelWindow {
|
|||
fillMode: Image.PreserveAspectCrop
|
||||
asynchronous: true
|
||||
cache: true
|
||||
sourceSize.width: Math.min(width, 150)
|
||||
sourceSize.height: Math.min(height, 90)
|
||||
smooth: true
|
||||
mipmap: true
|
||||
// Limit memory usage
|
||||
sourceSize.width: 480
|
||||
sourceSize.height: 270
|
||||
}
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue