This commit is contained in:
=
2025-07-31 23:48:40 -05:00
parent 77927dcd50
commit b8d7bce6be

104
Main.qml
View File

@@ -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