near finished version

This commit is contained in:
eximus
2017-03-29 18:23:32 +01:00
parent c24073a7f2
commit 84063e0724

116
Main.qml
View File

@@ -75,38 +75,47 @@ Rectangle {
Rectangle { Rectangle {
id: login_container id: login_container
y: 566 y: 912
width: parent.width * 0.3 width: 445
height: parent.height * 0.2 height: 82
color: "transparent" color: "transparent"
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: 174 anchors.leftMargin: 166
Row { Rectangle {
id: username_row id: username_row
anchors.right: parent.right y: 0
anchors.rightMargin: 100 height: 30
color: "transparent"
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: 100 anchors.leftMargin: 0
anchors.right: parent.right
anchors.rightMargin: 0
transformOrigin: Item.Center transformOrigin: Item.Center
anchors.margins: 10 anchors.margins: 10
spacing: 10
Text { Text {
id: username_label id: username_label
width: 376 width: 120
text: textConstants.userName height: 20
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignLeft
font.family: textFont.name font.family: textFont.name
font.bold: true font.bold: true
font.pixelSize: 16 font.pixelSize: 16
color: "white" color: "white"
text: "Username"
anchors.verticalCenter: parent.verticalCenter
} }
TextBox { TextBox {
id: username_input_box id: username_input_box
width: parent.width height: 30
text: userModel.lastUser text: userModel.lastUser
anchors.verticalCenter: parent.verticalCenter
anchors.left: username_label.right
anchors.leftMargin: 0
anchors.right: parent.right
anchors.rightMargin: 0
font: textFont.name font: textFont.name
color: "#25000000" color: "#25000000"
borderColor: "transparent" borderColor: "transparent"
@@ -119,34 +128,39 @@ Rectangle {
} }
} }
KeyNavigation.backtab: layoutBox; KeyNavigation.tab: password_input_box KeyNavigation.backtab: password_input_box; KeyNavigation.tab: password_input_box
} }
Text { Text {
id: error_message id: error_message
height: 30
font.family: textFont.name font.family: textFont.name
font.pixelSize: 12 font.pixelSize: 12
color: "white" color: "white"
anchors.verticalCenter: parent.verticalCenter
anchors.right: username_input_box.right
anchors.rightMargin: 0
anchors.left: username_input_box.left anchors.left: username_input_box.left
anchors.leftMargin: 376 anchors.leftMargin: 0
} }
} }
Row { Rectangle {
id: password_row id: password_row
y: 42
height: 30
color: "transparent"
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: 100 anchors.rightMargin: 0
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: 100 anchors.leftMargin: 0
anchors.top: username_row.bottom
anchors.topMargin: 10
spacing: 10
Text { Text {
id: password_label id: password_label
width: parent.width width: 120
text: textConstants.password text: textConstants.password
horizontalAlignment: Text.AlignHCenter anchors.verticalCenter: parent.verticalCenter
horizontalAlignment: Text.AlignLeft
font.family: textFont.name font.family: textFont.name
font.bold: true font.bold: true
font.pixelSize: 16 font.pixelSize: 16
@@ -155,9 +169,14 @@ Rectangle {
PasswordBox { PasswordBox {
id: password_input_box id: password_input_box
width: parent.width height: 30
font: textFont.name font: textFont.name
color: "#25000000" color: "#25000000"
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 30
anchors.left: password_label.right
anchors.leftMargin: 0
borderColor: "transparent" borderColor: "transparent"
textColor: "white" textColor: "white"
tooltipBG: "#25000000" tooltipBG: "#25000000"
@@ -173,18 +192,18 @@ Rectangle {
KeyNavigation.backtab: username_input_box; KeyNavigation.tab: login_button KeyNavigation.backtab: username_input_box; KeyNavigation.tab: login_button
} }
}
Button { Button {
id: login_button id: login_button
text: textConstants.login height: 30
anchors.top: password_input_box.bottom color: "#393939"
anchors.topMargin: 5 text: ">"
anchors.verticalCenter: parent.verticalCenter
border.color: "#00000000"
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: 0 anchors.rightMargin: 0
anchors.left: parent.left anchors.left: password_input_box.right
anchors.leftMargin: 0 anchors.leftMargin: 0
color: "#404753"
disabledColor: "#dc322f" disabledColor: "#dc322f"
activeColor: "#268bd2" activeColor: "#268bd2"
pressedColor: "#2aa198" pressedColor: "#2aa198"
@@ -195,15 +214,16 @@ Rectangle {
KeyNavigation.backtab: password_input_box; KeyNavigation.tab: reboot_button KeyNavigation.backtab: password_input_box; KeyNavigation.tab: reboot_button
} }
}
} }
Clock { Clock {
id: clock id: clock
y: 405 y: 751
color: "white" color: "white"
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: 268 anchors.leftMargin: 166
timeFont.family: textFont.name timeFont.family: textFont.name
dateFont.family: textFont.name dateFont.family: textFont.name
} }
@@ -224,41 +244,21 @@ Rectangle {
height: parent.height height: parent.height
spacing: 10 spacing: 10
Text {
height: parent.height
anchors.verticalCenter: parent.verticalCenter
font.family: textFont.name
verticalAlignment: Text.AlignVCenter
color: "transparent"
}
ComboBox { ComboBox {
id: session id: session
width: 145 width: 145
height: 20 height: 20
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
color: "transparent" color: "transparent"
arrowColor: "transparent"
textColor: "white" textColor: "white"
borderColor: "transparent" borderColor: "transparent"
hoverColor: "#073642" hoverColor: "#5692c4"
arrowColor: "#25000000"
model: sessionModel model: sessionModel
index: sessionModel.lastIndex index: sessionModel.lastIndex
KeyNavigation.backtab: shutdown_button; KeyNavigation.tab: layoutBox KeyNavigation.backtab: shutdown_button; KeyNavigation.tab: password_input_box
}
Text {
height: parent.height
anchors.verticalCenter: parent.verticalCenter
font.family: textFont.name
font.pixelSize: 16
font.bold: true
verticalAlignment: Text.AlignVCenter
color: "white"
} }
ComboBox { ComboBox {
@@ -270,11 +270,10 @@ Rectangle {
height: 20 height: 20
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
color: "transparent" color: "transparent"
arrowColor: "transparent"
textColor: "white" textColor: "white"
borderColor: "transparent" borderColor: "transparent"
hoverColor: "#073642" hoverColor: "#5692c4"
arrowIcon: "arrow.svg"
arrowColor: "#25000000"
onValueChanged: keyboard.currentLayout = id onValueChanged: keyboard.currentLayout = id
@@ -297,7 +296,6 @@ Rectangle {
text: modelItem ? modelItem.modelData.shortName : "zz" text: modelItem ? modelItem.modelData.shortName : "zz"
font.family: textFont.name font.family: textFont.name
font.pixelSize: 14 font.pixelSize: 14
color: "white"
} }
} }
KeyNavigation.backtab: session; KeyNavigation.tab: username_input_box KeyNavigation.backtab: session; KeyNavigation.tab: username_input_box