1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-27 23:12:49 -05:00

replace qmlformat with a better tool

still not perfect, but well - what can ya do
This commit is contained in:
bbedward
2025-08-08 15:55:37 -04:00
parent 8dc6e2805d
commit 4d408c65f2
137 changed files with 30315 additions and 29625 deletions

View File

@@ -1,4 +1,4 @@
pragma ComponentBehavior: Bound
pragma ComponentBehavior
import QtQuick
import Quickshell
@@ -7,57 +7,57 @@ import Quickshell.Wayland
import qs.Common
Item {
id: root
function activate() {
loader.activeAsync = true
id: root
function activate() {
loader.activeAsync = true
}
LazyLoader {
id: loader
WlSessionLock {
id: lock
property bool unlocked: false
property string sharedPasswordBuffer: ""
locked: true
onLockedChanged: {
if (!locked)
loader.active = false
}
LockSurface {
lock: lock
sharedPasswordBuffer: lock.sharedPasswordBuffer
onPasswordChanged: newPassword => {
lock.sharedPasswordBuffer = newPassword
}
}
}
}
LockScreenDemo {
id: demoWindow
}
IpcHandler {
target: "lock"
function lock(): void {
console.log("Lock screen requested via IPC")
loader.activeAsync = true
}
LazyLoader {
id: loader
WlSessionLock {
id: lock
property bool unlocked: false
property string sharedPasswordBuffer: ""
locked: true
onLockedChanged: {
if (!locked)
loader.active = false
}
LockSurface {
lock: lock
sharedPasswordBuffer: lock.sharedPasswordBuffer
onPasswordChanged: (newPassword) => {
lock.sharedPasswordBuffer = newPassword
}
}
}
function demo(): void {
console.log("Lock screen DEMO mode requested via IPC")
demoWindow.showDemo()
}
LockScreenDemo {
id: demoWindow
function isLocked(): bool {
return loader.active
}
IpcHandler {
target: "lock"
function lock(): void {
console.log("Lock screen requested via IPC")
loader.activeAsync = true
}
function demo(): void {
console.log("Lock screen DEMO mode requested via IPC")
demoWindow.showDemo()
}
function isLocked(): bool {
return loader.active
}
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
pragma ComponentBehavior: Bound
pragma ComponentBehavior
import QtQuick
import Quickshell
@@ -7,46 +7,46 @@ import qs.Common
import qs.Modals
PanelWindow {
id: root
property bool demoActive: false
visible: demoActive
anchors {
top: true
bottom: true
left: true
right: true
}
WlrLayershell.layer: WlrLayershell.Overlay
WlrLayershell.exclusiveZone: -1
WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive
color: "transparent"
function showDemo(): void {
console.log("Showing lock screen demo")
demoActive = true
}
function hideDemo(): void {
console.log("Hiding lock screen demo")
demoActive = false
}
PowerConfirmModal {
id: powerModal
}
id: root
Loader {
anchors.fill: parent
active: demoActive
sourceComponent: LockScreenContent {
demoMode: true
powerModal: powerModal
onUnlockRequested: root.hideDemo()
}
property bool demoActive: false
visible: demoActive
anchors {
top: true
bottom: true
left: true
right: true
}
WlrLayershell.layer: WlrLayershell.Overlay
WlrLayershell.exclusiveZone: -1
WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive
color: "transparent"
function showDemo(): void {
console.log("Showing lock screen demo")
demoActive = true
}
function hideDemo(): void {
console.log("Hiding lock screen demo")
demoActive = false
}
PowerConfirmModal {
id: powerModal
}
Loader {
anchors.fill: parent
active: demoActive
sourceComponent: LockScreenContent {
demoMode: true
powerModal: powerModal
onUnlockRequested: root.hideDemo()
}
}
}
}

View File

@@ -1,4 +1,4 @@
pragma ComponentBehavior: Bound
pragma ComponentBehavior
import QtQuick
import Quickshell
@@ -7,50 +7,50 @@ import qs.Common
import qs.Modals
WlSessionLockSurface {
id: root
id: root
required property WlSessionLock lock
required property string sharedPasswordBuffer
required property WlSessionLock lock
required property string sharedPasswordBuffer
signal passwordChanged(string newPassword)
signal passwordChanged(string newPassword)
property bool thisLocked: false
readonly property bool locked: thisLocked && !lock.unlocked
property bool thisLocked: false
readonly property bool locked: thisLocked && !lock.unlocked
function unlock(): void {
console.log("LockSurface.unlock() called")
lock.unlocked = true
animDelay.start()
}
function unlock(): void {
console.log("LockSurface.unlock() called")
lock.unlocked = true
animDelay.start()
}
Component.onCompleted: {
thisLocked = true
}
Component.onCompleted: {
thisLocked = true
}
color: "transparent"
color: "transparent"
Timer {
id: animDelay
interval: 1500 // Longer delay for success feedback
onTriggered: root.lock.locked = false
}
Timer {
id: animDelay
interval: 1500 // Longer delay for success feedback
onTriggered: root.lock.locked = false
}
PowerConfirmModal {
id: powerModal
}
PowerConfirmModal {
id: powerModal
}
Loader {
anchors.fill: parent
sourceComponent: LockScreenContent {
demoMode: false
powerModal: powerModal
passwordBuffer: root.sharedPasswordBuffer
onUnlockRequested: root.unlock()
onPasswordBufferChanged: {
if (root.sharedPasswordBuffer !== passwordBuffer) {
root.passwordChanged(passwordBuffer)
}
}
Loader {
anchors.fill: parent
sourceComponent: LockScreenContent {
demoMode: false
powerModal: powerModal
passwordBuffer: root.sharedPasswordBuffer
onUnlockRequested: root.unlock()
onPasswordBufferChanged: {
if (root.sharedPasswordBuffer !== passwordBuffer) {
root.passwordChanged(passwordBuffer)
}
}
}
}
}
}