From b8d7bce6be0597b2fb6879f58b56189da36a608e Mon Sep 17 00:00:00 2001 From: = Date: Thu, 31 Jul 2025 23:48:40 -0500 Subject: [PATCH] Fixes? --- Main.qml | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 100 insertions(+), 4 deletions(-) diff --git a/Main.qml b/Main.qml index 8b58659..cc275b7 100644 --- a/Main.qml +++ b/Main.qml @@ -90,6 +90,19 @@ Item { event.accepted = false; } + //takes one full minute for the ui to disappear + Timer { + id: fadeoutTimer + running: true + interval: 60000 + onTriggered: { + if (!loginScreenRoot.blockUI) { + userListComponent.mainPasswordBox.showPassword = false; + loginScreenRoot.uiVisible = false; + } + } + } + QQC2.StackView { id: mainStack anchors { @@ -125,7 +138,6 @@ Item { userListCurrentIndex: userModel.lastIndex >= 0 ? userModel.lastIndex : 0 lastUserName: userModel.lastUser showUserList: { - userListComponent.userList.opacity = 0 if (!userListModel.hasOwnProperty("count") || !userListModel.hasOwnProperty("disableAvatarsThreshold")) { return false @@ -139,6 +151,8 @@ Item { return false } + userListComponent.userList.opacity = 0 + return userListModel.count <= userListModel.disableAvatarsThreshold } @@ -153,9 +167,9 @@ Item { return parts.join(" • "); } - /*actionItemsVisible: !inputPanel.keyboardActive + actionItemsVisible: !inputPanel.keyboardActive actionItems: [ - ActionButton { + /*ActionButton { icon.name: "system-suspend" text: i18ndc("plasma-desktop-sddm-theme", "Suspend to RAM", "Sleep") onClicked: sddm.suspend() @@ -178,7 +192,7 @@ Item { text: i18ndc("plasma-desktop-sddm-theme", "For switching to a username and password prompt", "Other…") onClicked: mainStack.push(userPromptComponent) visible: !userListComponent.showUsernamePrompt - }]*/ + }*/] onLoginRequest: { root.notificationMessage = "" @@ -321,6 +335,48 @@ Item { } } + DropShadow { + id: logoShadow + anchors.fill: logo + source: logo + visible: !softwareRendering && config.showlogo === "shown" + horizontalOffset: 1 + verticalOffset: 1 + radius: 6 + samples: 14 + spread: 0.3 + color : "black" // shadows should always be black + opacity: loginScreenRoot.uiVisible ? 0 : 1 + Behavior on opacity { + //OpacityAnimator when starting from 0 is buggy (it shows one frame with opacity 1)" + NumberAnimation { + duration: Kirigami.Units.longDuration + easing.type: Easing.InOutQuad + } + } + } + + Image { + id: logo + visible: config.showlogo === "shown" + source: config.logo + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: footer.top + anchors.bottomMargin: Kirigami.Units.largeSpacing + asynchronous: true + sourceSize.height: height + opacity: loginScreenRoot.uiVisible ? 0 : 1 + fillMode: Image.PreserveAspectFit + height: Math.round(Kirigami.Units.gridUnit * 3.5) + Behavior on opacity { + // OpacityAnimator when starting from 0 is buggy (it shows one frame with opacity 1)" + NumberAnimation { + duration: Kirigami.Units.longDuration + easing.type: Easing.InOutQuad + } + } + } + // Note: Containment masks stretch clickable area of their buttons to // the screen edges, essentially making them adhere to Fitts's law. // Due to virtual keyboard button having an icon, buttons may have @@ -343,6 +399,46 @@ Item { } } + PlasmaComponents3.ToolButton { + id: virtualKeyboardButton + + text: i18ndc("plasma-desktop-sddm-theme", "Button to show/hide virtual keyboard", "Virtual Keyboard") + icon.name: inputPanel.keyboardActive ? "input-keyboard-virtual-on" : "input-keyboard-virtual-off" + onClicked: { + // Otherwise the password field loses focus and virtual keyboard + // keystrokes get eaten + userListComponent.mainPasswordBox.forceActiveFocus(); + inputPanel.showHide() + } + visible: inputPanel.status === Loader.Ready + + Layout.fillHeight: true + containmentMask: Item { + parent: virtualKeyboardButton + anchors.fill: parent + anchors.leftMargin: -footer.anchors.margins + anchors.bottomMargin: -footer.anchors.margins + } + } + + KeyboardButton { + id: keyboardButton + + onKeyboardLayoutChanged: { + // Otherwise the password field loses focus and virtual keyboard + // keystrokes get eaten + userListComponent.mainPasswordBox.forceActiveFocus(); + } + + Layout.fillHeight: true + containmentMask: Item { + parent: keyboardButton + anchors.fill: parent + anchors.leftMargin: virtualKeyboardButton.visible ? 0 : -footer.anchors.margins + anchors.bottomMargin: -footer.anchors.margins + } + } + SessionButton { id: sessionButton