Add display identification overlays
This commit is contained in:
@@ -43,6 +43,7 @@ Singleton {
|
||||
property int revertGeneration: -1
|
||||
property bool externalChangeBlocked: false
|
||||
property int secondsLeft: 0
|
||||
property bool identifying: false
|
||||
|
||||
readonly property bool awaitingConfirmation: root.pendingRequestedLayout !== null
|
||||
readonly property bool canConfirm: root.awaitingConfirmation
|
||||
@@ -123,6 +124,11 @@ Singleton {
|
||||
return false;
|
||||
}
|
||||
|
||||
function identify(): void {
|
||||
root.identifying = true;
|
||||
identifyTimer.restart();
|
||||
}
|
||||
|
||||
function parse(text: string, generation: int): void {
|
||||
try {
|
||||
const raw = JSON.parse(text);
|
||||
@@ -520,6 +526,13 @@ Singleton {
|
||||
root.lastError = "The previous display setting could not be verified. Open Displays and restore it manually.";
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: identifyTimer
|
||||
interval: 3000
|
||||
repeat: false
|
||||
onTriggered: root.identifying = false
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: verifyTimer
|
||||
property int attempts: 0
|
||||
|
||||
Reference in New Issue
Block a user