work on password field
This commit is contained in:
parent
0f50fed82f
commit
9ab65de03e
4 changed files with 51 additions and 48 deletions
|
@ -109,14 +109,12 @@ Item {
|
|||
}
|
||||
]
|
||||
|
||||
transitions: [
|
||||
Transition {
|
||||
PropertyAnimation {
|
||||
properties: "color, opacity"
|
||||
duration: 150
|
||||
}
|
||||
transitions: Transition {
|
||||
PropertyAnimation {
|
||||
properties: "color, opacity"
|
||||
duration: 150
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
onClicked: sddm.login(user, password, session)
|
||||
}
|
||||
|
|
|
@ -2,14 +2,57 @@ import QtQuick 2.12
|
|||
import QtQuick.Controls 2.12
|
||||
|
||||
TextField {
|
||||
id: passwordField
|
||||
|
||||
focus: true
|
||||
selectByMouse: true
|
||||
echoMode: TextInput.Normal
|
||||
|
||||
echoMode: TextInput.Password
|
||||
passwordCharacter: "•"
|
||||
passwordMaskDelay: 1000
|
||||
|
||||
renderType: Text.NativeRendering
|
||||
font.family: config.Font
|
||||
font.pointSize: config.LoginFontSize
|
||||
font.bold: true
|
||||
color: config.AccentText
|
||||
horizontalAlignment: TextInput.AlignHCenter
|
||||
|
||||
placeholderText: "Enter Password"
|
||||
|
||||
background: Rectangle {
|
||||
id: fieldBackground
|
||||
|
||||
color: config.AccentDark
|
||||
border.color: config.AccentText
|
||||
border.width: 0
|
||||
radius: 5
|
||||
}
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "focused"
|
||||
when: passwordField.activeFocus
|
||||
PropertyChanges {
|
||||
target: fieldBackground
|
||||
color: Qt.darker(config.AccentDark, 1.2)
|
||||
border.width: 3
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "hovered"
|
||||
when: passwordField.hovered
|
||||
PropertyChanges {
|
||||
target: fieldBackground
|
||||
color: Qt.darker(config.AccentDark, 1.2)
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
transitions: Transition {
|
||||
PropertyAnimation {
|
||||
properties: "color, border.color, border.width"
|
||||
duration: 150
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ ComboBox {
|
|||
textRole: "name"
|
||||
|
||||
indicator.visible: false
|
||||
hoverEnabled: true
|
||||
|
||||
contentItem: Text {
|
||||
renderType: Text.NativeRendering
|
||||
|
@ -18,19 +19,6 @@ ComboBox {
|
|||
text: "Session: " + parent.currentText
|
||||
}
|
||||
|
||||
/*
|
||||
background: Rectangle {
|
||||
height: 50
|
||||
width: displayedItem.implicitWidth
|
||||
anchors.bottom: parent.top
|
||||
anchors.left: parent.left
|
||||
|
||||
border.width: parent.visualFocus ? 1 : 0
|
||||
border.color: "black"
|
||||
color: "white"
|
||||
}
|
||||
*/
|
||||
|
||||
delegate: ItemDelegate {
|
||||
id: sessionEntry
|
||||
|
||||
|
@ -46,13 +34,6 @@ ComboBox {
|
|||
|
||||
text: model.name
|
||||
}
|
||||
|
||||
/*
|
||||
highlighted: parent.highlightedIndex === index
|
||||
background: Rectangle {
|
||||
color: parent.highlightedIndex === index ? "blue" : "white"
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
onActivated: print(currentIndex)
|
||||
|
|
|
@ -7,6 +7,7 @@ ComboBox {
|
|||
textRole: "name"
|
||||
|
||||
indicator.visible: false
|
||||
hoverEnabled: true
|
||||
|
||||
contentItem: Text {
|
||||
renderType: Text.NativeRendering
|
||||
|
@ -17,19 +18,6 @@ ComboBox {
|
|||
|
||||
text: parent.currentText
|
||||
}
|
||||
|
||||
/*
|
||||
background: Rectangle {
|
||||
height: 50
|
||||
width: displayedItem.implicitWidth
|
||||
anchors.bottom: parent.top
|
||||
anchors.left: parent.left
|
||||
|
||||
border.width: parent.visualFocus ? 1 : 0
|
||||
border.color: "black"
|
||||
color: "white"
|
||||
}
|
||||
*/
|
||||
|
||||
delegate: ItemDelegate {
|
||||
id: userEntry
|
||||
|
@ -46,13 +34,6 @@ ComboBox {
|
|||
|
||||
text: model.name
|
||||
}
|
||||
|
||||
/*
|
||||
highlighted: parent.highlightedIndex === index
|
||||
background: Rectangle {
|
||||
color: parent.highlightedIndex === index ? "blue" : "white"
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
onActivated: print(currentText)
|
||||
|
|
Loading…
Add table
Reference in a new issue