Merge pull request #10 from ferrreo/lockscreen-fixes
fix: lockscreen fixes + systray
This commit is contained in:
commit
4baab691f0
5 changed files with 55 additions and 36 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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 }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue