Merge pull request #10 from ferrreo/lockscreen-fixes

fix: lockscreen fixes + systray
This commit is contained in:
Lysec 2025-07-14 13:56:57 +02:00 committed by GitHub
commit 4baab691f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 55 additions and 36 deletions

View file

@ -100,19 +100,18 @@ Scope {
Brightness {
id: widgetsBrightness
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: 1
}
Volume {
id: widgetsVolume
shell: rootScope.shell
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: 1
}
SystemTray {
id: systemTrayModule
shell: rootScope.shell
anchors.verticalCenter: parent.verticalCenter
bar: panel
trayMenu: externalTrayMenu
}
@ -123,7 +122,6 @@ Scope {
ClockWidget {
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: 1
}
PanelPopup {
@ -133,7 +131,6 @@ Scope {
Button {
barBackground: barBackground
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: 1
screen: modelData
sidebarPopup: sidebarPopup
}

View file

@ -15,12 +15,13 @@ PanelWindow {
implicitHeight: 640
color: "transparent"
visible: false
WlrLayershell.exclusionMode: ExclusionMode.Ignore
WlrLayershell.keyboardFocus: visible ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None
screen: (typeof modelData !== 'undefined' ? modelData : null)
property bool shouldBeVisible: false
anchors.top: true
margins.top: -26
margins.top: 36
function showAt() {
visible = true;

View file

@ -2,8 +2,10 @@ import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import Quickshell
import Qt5Compat.GraphicalEffects
import Quickshell.Services.SystemTray
import Quickshell.Widgets
import qs.Settings
Row {
property var bar
@ -42,13 +44,22 @@ Row {
}
}
Rectangle {
anchors.centerIn: parent
width: 16
height: 16
radius: 6
color: "transparent"
clip: true
IconImage {
id: trayIcon
anchors.centerIn: parent
width: 18
height: 18
smooth: false // Memory savings
width: 16
height: 16
smooth: false
asynchronous: true
backer.fillMode: Image.PreserveAspectFit
source: {
let icon = modelData?.icon || "";
if (!icon) return "";
@ -61,6 +72,7 @@ Row {
return icon;
}
opacity: status === Image.Ready ? 1 : 0
Behavior on opacity {
NumberAnimation {
duration: 300
@ -68,7 +80,8 @@ Row {
}
}
Component.onCompleted: {
// console.log("Tray icon for", modelData?.id, ":", modelData?.icon)
}
}
}

View file

@ -54,6 +54,7 @@ QtObject {
transitionFps = settings.value("transitionFps", transitionFps)
transitionType = settings.value("transitionType", transitionType)
transitionDuration = settings.value("transitionDuration", transitionDuration)
WallpaperManager.setCurrentWallpaper(currentWallpaper, true);
}
function saveSettings() {

View file

@ -129,9 +129,7 @@ WlSessionLock {
fillMode: Image.PreserveAspectCrop
source: WallpaperManager.currentWallpaper !== "" ? WallpaperManager.currentWallpaper : ""
cache: true
smooth: true
sourceSize.width: 2560
sourceSize.height: 1440
smooth: false
visible: true // Show the original for FastBlur input
}
FastBlur {
@ -208,7 +206,7 @@ WlSessionLock {
height: 50
radius: 25
color: Theme.surface
opacity: 0.3
opacity: passwordInput.activeFocus ? 0.8 : 0.3
border.color: passwordInput.activeFocus ? Theme.accentPrimary : Theme.outline
border.width: 2
@ -244,6 +242,10 @@ WlSessionLock {
lock.unlockAttempt()
}
}
Component.onCompleted: {
forceActiveFocus()
}
}
}
@ -268,15 +270,16 @@ WlSessionLock {
width: 120
height: 44
radius: 22
color: unlockButtonArea.containsMouse ? Theme.accentPrimary : "transparent"
opacity: unlockButtonArea.containsMouse ? 0.8 : 0.5
color: unlockButtonArea.containsMouse ? Theme.accentPrimary : Theme.surface
border.color: Theme.accentPrimary
border.width: 2
opacity: lock.authenticating ? 0.5 : 0.8
enabled: !lock.authenticating
Text {
id: unlockButtonText
anchors.centerIn: parent
text: lock.authenticating ? "Authenticating..." : "Unlock"
text: lock.authenticating ? "..." : "Unlock"
font.family: Theme.fontFamily
font.pixelSize: 16
font.bold: true
@ -293,6 +296,10 @@ WlSessionLock {
}
}
}
Behavior on opacity {
NumberAnimation { duration: 200 }
}
}
}