1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-27 15:02:50 -05:00

Restructure lock screen

This commit is contained in:
bbedward
2025-10-13 17:44:09 -04:00
parent 3e167a2c52
commit a3ada5b2bb
10 changed files with 26 additions and 33 deletions

View File

@@ -54,26 +54,8 @@ Item {
WallpaperBackground {} WallpaperBackground {}
LazyLoader { Lock {
id: lockLoader id: lock
active: false
Lock {
id: lock
anchors.fill: parent
Component.onCompleted: {
IdleService.lockComponent = lock
}
}
}
Timer {
id: lockInitTimer
interval: 100
running: true
repeat: false
onTriggered: lockLoader.active = true
} }
Loader { Loader {
@@ -195,7 +177,7 @@ Item {
powerMenuModalLoader: controlCenterLoader.powerModalLoaderRef powerMenuModalLoader: controlCenterLoader.powerModalLoaderRef
onLockRequested: { onLockRequested: {
lockLoader.item.activate() lock.activate()
} }
Component.onCompleted: { Component.onCompleted: {

View File

@@ -22,7 +22,7 @@ Rectangle {
property Item windowRoot: (Window.window ? Window.window.contentItem : null) property Item windowRoot: (Window.window ? Window.window.contentItem : null)
readonly property var sortedToplevels: { readonly property var sortedToplevels: {
if (SettingsData.runningAppsCurrentWorkspace) { if (SettingsData.runningAppsCurrentWorkspace) {
return CompositorService.filterCurrentWorkspace(CompositorService.sortedToplevels, parentScreen.name); return CompositorService.filterCurrentWorkspace(CompositorService.sortedToplevels, parentScreen?.name);
} }
return CompositorService.sortedToplevels; return CompositorService.sortedToplevels;
} }

View File

@@ -1,5 +1,6 @@
pragma ComponentBehavior: Bound
import QtQuick import QtQuick
import QtQuick.Controls
import qs.Common import qs.Common
import qs.Services import qs.Services
import qs.Widgets import qs.Widgets

View File

@@ -1,3 +1,5 @@
pragma ComponentBehavior: Bound
import QtQuick import QtQuick
import qs.Common import qs.Common

View File

@@ -1,3 +1,5 @@
pragma ComponentBehavior: Bound
import QtQuick import QtQuick
Item { Item {

View File

@@ -1,3 +1,5 @@
pragma ComponentBehavior: Bound
import QtQuick import QtQuick
import Quickshell import Quickshell
import Quickshell.Io import Quickshell.Io
@@ -5,14 +7,12 @@ import Quickshell.Wayland
import qs.Common import qs.Common
import qs.Services import qs.Services
Item { Scope {
id: root
property string sharedPasswordBuffer: "" property string sharedPasswordBuffer: ""
property bool shouldLock: false property bool shouldLock: false
Component.onCompleted: { Component.onCompleted: {
IdleService.lockComponent = root IdleService.lockComponent = this
} }
function activate() { function activate() {
@@ -42,7 +42,7 @@ Item {
WlSessionLock { WlSessionLock {
id: sessionLock id: sessionLock
locked: root.shouldLock locked: shouldLock
WlSessionLockSurface { WlSessionLockSurface {
color: "transparent" color: "transparent"
@@ -50,12 +50,12 @@ Item {
LockSurface { LockSurface {
anchors.fill: parent anchors.fill: parent
lock: sessionLock lock: sessionLock
sharedPasswordBuffer: root.sharedPasswordBuffer sharedPasswordBuffer: sharedPasswordBuffer
onUnlockRequested: { onUnlockRequested: {
root.shouldLock = false shouldLock = false
} }
onPasswordChanged: newPassword => { onPasswordChanged: newPassword => {
root.sharedPasswordBuffer = newPassword sharedPasswordBuffer = newPassword
} }
} }
} }

View File

@@ -1,3 +1,5 @@
pragma ComponentBehavior: Bound
import QtQuick import QtQuick
import qs.Common import qs.Common
import qs.Services import qs.Services

View File

@@ -1,6 +1,7 @@
pragma ComponentBehavior: Bound
import QtCore import QtCore
import QtQuick import QtQuick
import QtQuick.Controls
import QtQuick.Effects import QtQuick.Effects
import QtQuick.Layouts import QtQuick.Layouts
import Quickshell import Quickshell

View File

@@ -1,3 +1,5 @@
pragma ComponentBehavior: Bound
import QtQuick import QtQuick
import Quickshell import Quickshell
import Quickshell.Wayland import Quickshell.Wayland

View File

@@ -1,5 +1,6 @@
pragma ComponentBehavior: Bound
import QtQuick import QtQuick
import QtQuick.Controls
import Quickshell import Quickshell
import Quickshell.Wayland import Quickshell.Wayland
import qs.Common import qs.Common