50 lines
1 KiB
QML
50 lines
1 KiB
QML
import QtQuick 2.15
|
|
import QtQuick.Controls 2.15
|
|
|
|
TextField {
|
|
id: passwordField
|
|
focus: true
|
|
selectByMouse: true
|
|
placeholderText: "Password"
|
|
echoMode: TextInput.Password
|
|
passwordCharacter: "•"
|
|
passwordMaskDelay: config.PasswordShowLastLetter
|
|
selectionColor: "#6E738D"
|
|
renderType: Text.NativeRendering
|
|
font {
|
|
family: config.Font
|
|
pointSize: config.FontSize
|
|
bold: true
|
|
}
|
|
color: "#CAD3F5"
|
|
horizontalAlignment: TextInput.AlignHCenter
|
|
background: Rectangle {
|
|
id: passFieldBackground
|
|
radius: 3
|
|
color: "#363A4F"
|
|
}
|
|
states: [
|
|
State {
|
|
name: "focused"
|
|
when: passwordField.activeFocus
|
|
PropertyChanges {
|
|
target: passFieldBackground
|
|
color: "#494D64"
|
|
}
|
|
},
|
|
State {
|
|
name: "hovered"
|
|
when: passwordField.hovered
|
|
PropertyChanges {
|
|
target: passFieldBackground
|
|
color: "#494D64"
|
|
}
|
|
}
|
|
]
|
|
transitions: Transition {
|
|
PropertyAnimation {
|
|
properties: "color"
|
|
duration: 300
|
|
}
|
|
}
|
|
}
|