50 lines
984 B
QML
50 lines
984 B
QML
import QtQuick 2.15
|
|
import QtQuick.Controls 2.15
|
|
|
|
TextField {
|
|
id: userField
|
|
height: inputHeight
|
|
width: inputWidth
|
|
selectByMouse: true
|
|
echoMode: TextInput.Normal
|
|
selectionColor: "#6E738D"
|
|
renderType: Text.NativeRendering
|
|
font {
|
|
family: config.Font
|
|
pointSize: config.FontSize
|
|
bold: true
|
|
}
|
|
color: "#CAD3F5"
|
|
horizontalAlignment: Text.AlignHCenter
|
|
placeholderText: "Username"
|
|
text: userModel.lastUser
|
|
background: Rectangle {
|
|
id: userFieldBackground
|
|
color: "#363A4F"
|
|
radius: 3
|
|
}
|
|
states: [
|
|
State {
|
|
name: "focused"
|
|
when: userField.activeFocus
|
|
PropertyChanges {
|
|
target: userFieldBackground
|
|
color: "#494D64"
|
|
}
|
|
},
|
|
State {
|
|
name: "hovered"
|
|
when: userField.hovered
|
|
PropertyChanges {
|
|
target: userFieldBackground
|
|
color: "#494D64"
|
|
}
|
|
}
|
|
]
|
|
transitions: Transition {
|
|
PropertyAnimation {
|
|
properties: "color"
|
|
duration: 300
|
|
}
|
|
}
|
|
}
|