Redo to not delete a bunch of stuff
This commit is contained in:
122
Login.qml
122
Login.qml
@@ -85,20 +85,6 @@ SessionManagementScreen {
|
||||
focus: showUsernamePrompt && !lastUserName //if there's a username prompt it gets focus first, otherwise password does
|
||||
placeholderText: i18nd("plasma-desktop-sddm-theme", "Username")
|
||||
|
||||
// Add padding for yellow border
|
||||
leftPadding: Kirigami.Units.smallSpacing * 2 // ~8px padding
|
||||
rightPadding: Kirigami.Units.smallSpacing * 2
|
||||
topPadding: Kirigami.Units.smallSpacing
|
||||
bottomPadding: Kirigami.Units.smallSpacing
|
||||
|
||||
// Custom background with yellow border and no fill
|
||||
background: Rectangle {
|
||||
color: "transparent" // No background fill
|
||||
border.color: "#FFE710" // Yellow border
|
||||
border.width: 3 // Border thickness
|
||||
radius: 4 // Optional: slight rounding for aesthetics
|
||||
}
|
||||
|
||||
onAccepted: {
|
||||
if (root.loginScreenUiVisible) {
|
||||
passwordBox.forceActiveFocus()
|
||||
@@ -106,63 +92,77 @@ SessionManagementScreen {
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
width: 2560
|
||||
height: 1440
|
||||
color: "transparent"
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
|
||||
PlasmaExtras.PasswordField {
|
||||
id: passwordBox
|
||||
x: -330
|
||||
y: 243
|
||||
width: parent.width * 0.8
|
||||
Rectangle {
|
||||
PlasmaExtras.PasswordField {
|
||||
id: passwordBox
|
||||
x: -470
|
||||
y: 248
|
||||
width: 945
|
||||
font.pointSize: fontSize + 20
|
||||
Layout.fillWidth: false
|
||||
|
||||
font.pointSize: fontSize + 20
|
||||
placeholderText: i18nd("plasma-desktop-sddm-theme", "Password")
|
||||
focus: !showUsernamePrompt || lastUserName
|
||||
|
||||
placeholderText: i18nd("plasma-desktop-sddm-theme", "Password")
|
||||
// Disable reveal password action because SDDM does not have the breeze icon set loaded
|
||||
rightActions: []
|
||||
|
||||
focus: !showUsernamePrompt || lastUserName
|
||||
rightActions: []
|
||||
|
||||
leftPadding: Kirigami.Units.smallSpacing * 2
|
||||
rightPadding: Kirigami.Units.smallSpacing * 2
|
||||
topPadding: Kirigami.Units.smallSpacing
|
||||
bottomPadding: Kirigami.Units.smallSpacing
|
||||
|
||||
background: Rectangle {
|
||||
color: "transparent"
|
||||
}
|
||||
|
||||
visible: root.showUsernamePrompt || userList.currentItem.needsPassword
|
||||
|
||||
onAccepted: {
|
||||
if (root.loginScreenUiVisible) {
|
||||
startLogin();
|
||||
// Theming
|
||||
background: Rectangle {
|
||||
color: "transparent"
|
||||
}
|
||||
}
|
||||
|
||||
Keys.onEscapePressed: {
|
||||
mainStack.currentItem.forceActiveFocus();
|
||||
}
|
||||
|
||||
Keys.onPressed: event => {
|
||||
if (event.key === Qt.Key_Left && !text) {
|
||||
userList.decrementCurrentIndex();
|
||||
event.accepted = true
|
||||
onAccepted: {
|
||||
if (root.loginScreenUiVisible) {
|
||||
startLogin();
|
||||
}
|
||||
}
|
||||
if (event.key === Qt.Key_Right && !text) {
|
||||
userList.incrementCurrentIndex();
|
||||
event.accepted = true
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: sddm
|
||||
function onLoginFailed() {
|
||||
passwordBox.selectAll()
|
||||
passwordBox.forceActiveFocus()
|
||||
visible: root.showUsernamePrompt || userList.currentItem.needsPassword
|
||||
|
||||
Keys.onEscapePressed: {
|
||||
mainStack.currentItem.forceActiveFocus();
|
||||
}
|
||||
|
||||
//if empty and left or right is pressed change selection in user switch
|
||||
//this cannot be in keys.onLeftPressed as then it doesn't reach the password box
|
||||
Keys.onPressed: event => {
|
||||
if (event.key === Qt.Key_Left && !text) {
|
||||
userList.decrementCurrentIndex();
|
||||
event.accepted = true
|
||||
}
|
||||
if (event.key === Qt.Key_Right && !text) {
|
||||
userList.incrementCurrentIndex();
|
||||
event.accepted = true
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: sddm
|
||||
function onLoginFailed() {
|
||||
passwordBox.selectAll()
|
||||
passwordBox.forceActiveFocus()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PlasmaComponents3.Button {
|
||||
id: loginButton
|
||||
visible: false
|
||||
Accessible.name: i18nd("plasma-desktop-sddm-theme", "Log In")
|
||||
Layout.preferredHeight: passwordBox.implicitHeight
|
||||
Layout.preferredWidth: text.length === 0 ? loginButton.Layout.preferredHeight : -1
|
||||
|
||||
icon.name: text.length === 0 ? (root.LayoutMirroring.enabled ? "go-previous" : "go-next") : ""
|
||||
|
||||
text: root.showUsernamePrompt || userList.currentItem.needsPassword ? "" : i18n("Log In")
|
||||
onClicked: startLogin()
|
||||
Keys.onEnterPressed: clicked()
|
||||
Keys.onReturnPressed: clicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user