75 lines
1.4 KiB
QML
75 lines
1.4 KiB
QML
import QtQuick 2.15
|
|
import QtQuick.Controls 2.15
|
|
import QtQuick.Controls.Basic
|
|
|
|
|
|
|
|
Window {
|
|
|
|
SystemPalette { id: activeColors; colorGroup: SystemPalette.Active }
|
|
SystemPalette { id: inactiveColors; colorGroup: SystemPalette.Inactive }
|
|
SystemPalette { id: disabledColors; colorGroup: SystemPalette.Disabled }
|
|
|
|
function getColors() {
|
|
return root.active ? activeColors : inactiveColors;
|
|
}
|
|
|
|
|
|
width: 400
|
|
height: 400
|
|
visible: true
|
|
|
|
color: getColors().window
|
|
|
|
Text {
|
|
id: loginL
|
|
anchors{
|
|
verticalCenter: parent.verticalCenter
|
|
verticalCenterOffset: -70
|
|
horizontalCenter: parent.horizontalCenter
|
|
}
|
|
|
|
|
|
text: qsTr("Login")
|
|
font.pointSize: 20
|
|
font.bold: true
|
|
color: getColors().text
|
|
}
|
|
|
|
TextField {
|
|
|
|
id: nameT
|
|
anchors{
|
|
horizontalCenter: parent.horizontalCenter
|
|
topMargin: 5
|
|
top: loginL.bottom
|
|
}
|
|
|
|
placeholderText: qsTr("Name")
|
|
|
|
}
|
|
|
|
TextField {
|
|
id: passwordT
|
|
anchors{
|
|
horizontalCenter: parent.horizontalCenter
|
|
topMargin: 5
|
|
top: nameT.bottom
|
|
}
|
|
|
|
placeholderText: qsTr("Password")
|
|
|
|
echoMode: TextInput.Password
|
|
}
|
|
|
|
Button {
|
|
id: submitB
|
|
anchors{
|
|
right: passwordT.right
|
|
topMargin: 5
|
|
top: passwordT.bottom
|
|
}
|
|
|
|
text: qsTr("Submit")
|
|
}
|
|
}
|