Alisa/native/LoginScreen.qml
2024-07-10 19:53:47 +02:00

80 lines
1.5 KiB
QML

import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Controls.Basic
//import "Main.qml" as M
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
Label{
id: loginL
anchors{
verticalCenter: parent.verticalCenter
verticalCenterOffset: -70
horizontalCenter: parent.horizontalCenter
}
text: qsTr("Login")
font.pointSize: 20
font.bold: true
color: getColor().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")
}
}