bugfix/7-get-rid-of-reference-errors #8
185
Main.qml
185
Main.qml
@ -101,8 +101,6 @@ Rectangle {
|
||||
anchors.fill: parent
|
||||
state: "off"
|
||||
source: video1
|
||||
mainStack: login_container
|
||||
footer: login_container
|
||||
}
|
||||
|
||||
// Set Background Video2
|
||||
@ -153,8 +151,6 @@ Rectangle {
|
||||
anchors.fill: parent
|
||||
state: "off"
|
||||
source: video2
|
||||
mainStack: login_container
|
||||
footer: login_container
|
||||
}
|
||||
|
||||
property MediaPlayer currentPlayer: mediaplayer1
|
||||
@ -527,180 +523,6 @@ Rectangle {
|
||||
y: parent.height * config.relativePositionY - clock.height / 2
|
||||
x: parent.width * config.relativePositionX - clock.width / 2
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: login_container
|
||||
|
||||
//y: parent.height * 0.8
|
||||
y: clock.y + clock.height + 30
|
||||
width: clock.width
|
||||
height: parent.height * 0.08
|
||||
color: "transparent"
|
||||
anchors.left: clock.left
|
||||
|
||||
Rectangle {
|
||||
id: username_row
|
||||
height: parent.height * 0.36
|
||||
color: "transparent"
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 0
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 0
|
||||
transformOrigin: Item.Center
|
||||
anchors.margins: 10
|
||||
|
||||
Text {
|
||||
id: username_label
|
||||
width: parent.width * 0.27
|
||||
height: parent.height * 0.66
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
font.family: textFont.name
|
||||
font.bold: true
|
||||
font.pixelSize: 16
|
||||
color: "white"
|
||||
text: "Username"
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
TextBox {
|
||||
id: username_input_box
|
||||
height: parent.height
|
||||
text: userModel.lastUser
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: username_label.right
|
||||
anchors.leftMargin: config.usernameLeftMargin
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 0
|
||||
font: textFont.name
|
||||
color: "#25000000"
|
||||
borderColor: "transparent"
|
||||
textColor: "white"
|
||||
|
||||
Keys.onPressed: {
|
||||
if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) {
|
||||
sddm.login(username_input_box.text, password_input_box.text, session.index)
|
||||
event.accepted = true
|
||||
}
|
||||
}
|
||||
|
||||
KeyNavigation.backtab: password_input_box
|
||||
KeyNavigation.tab: password_input_box
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: password_row
|
||||
y: username_row.height + 10
|
||||
height: parent.height * 0.36
|
||||
color: "transparent"
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 0
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 0
|
||||
|
||||
Text {
|
||||
id: password_label
|
||||
width: parent.width * 0.27
|
||||
text: textConstants.password
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
font.family: textFont.name
|
||||
font.bold: true
|
||||
font.pixelSize: 16
|
||||
color: "white"
|
||||
}
|
||||
|
||||
PasswordBox {
|
||||
id: password_input_box
|
||||
height: parent.height
|
||||
font: textFont.name
|
||||
color: "#25000000"
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: parent.height // this sets button width, this way its a square
|
||||
anchors.left: password_label.right
|
||||
anchors.leftMargin: config.passwordLeftMargin
|
||||
borderColor: "transparent"
|
||||
textColor: "white"
|
||||
tooltipBG: "#25000000"
|
||||
tooltipFG: "#dc322f"
|
||||
image: "components/resources/warning_red.png"
|
||||
onTextChanged: {
|
||||
if (password_input_box.text == "") {
|
||||
clear_passwd_button.visible = false
|
||||
}
|
||||
if (password_input_box.text != "" && config.showClearPasswordButton != "false") {
|
||||
clear_passwd_button.visible = true
|
||||
}
|
||||
}
|
||||
|
||||
Keys.onPressed: {
|
||||
if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) {
|
||||
sddm.login(username_input_box.text, password_input_box.text, session.index)
|
||||
event.accepted = true
|
||||
}
|
||||
}
|
||||
|
||||
KeyNavigation.backtab: username_input_box
|
||||
KeyNavigation.tab: login_button
|
||||
}
|
||||
|
||||
Button {
|
||||
id: clear_passwd_button
|
||||
height: parent.height
|
||||
width: parent.height
|
||||
color: "transparent"
|
||||
text: "x"
|
||||
font: textFont.name
|
||||
|
||||
border.color: "transparent"
|
||||
border.width: 0
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 0
|
||||
anchors.rightMargin: parent.height
|
||||
|
||||
disabledColor: "#dc322f"
|
||||
activeColor: "#393939"
|
||||
pressedColor: "#2aa198"
|
||||
|
||||
onClicked: {
|
||||
password_input_box.text=''
|
||||
password_input_box.focus = true
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
id: login_button
|
||||
height: parent.height
|
||||
color: "#393939"
|
||||
text: ">"
|
||||
border.color: "#00000000"
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: password_input_box.right
|
||||
anchors.right: parent.right
|
||||
disabledColor: "#dc322f"
|
||||
activeColor: "#268bd2"
|
||||
pressedColor: "#2aa198"
|
||||
textColor: "white"
|
||||
font: textFont.name
|
||||
|
||||
onClicked: sddm.login(username_input_box.text, password_input_box.text, session.index)
|
||||
}
|
||||
|
||||
Text {
|
||||
id: error_message
|
||||
height: parent.height
|
||||
font.family: textFont.name
|
||||
font.pixelSize: 12
|
||||
color: "white"
|
||||
anchors.top: password_input_box.bottom
|
||||
anchors.left: password_input_box.left
|
||||
anchors.leftMargin: 0
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
@ -728,12 +550,5 @@ Rectangle {
|
||||
playlist1.shuffle()
|
||||
playlist2.shuffle()
|
||||
}
|
||||
|
||||
if (config.showLoginButton == "false") {
|
||||
login_button.visible = false
|
||||
password_input_box.anchors.rightMargin = 0
|
||||
clear_passwd_button.anchors.rightMargin = 0
|
||||
}
|
||||
clear_passwd_button.visible = false
|
||||
}
|
||||
}
|
||||
|
@ -90,14 +90,6 @@ Item {
|
||||
states: [
|
||||
State {
|
||||
name: "on"
|
||||
PropertyChanges {
|
||||
target: mainStack
|
||||
opacity: 1
|
||||
}
|
||||
PropertyChanges {
|
||||
target: footer
|
||||
opacity: 1
|
||||
}
|
||||
PropertyChanges {
|
||||
target: wallpaperFader
|
||||
factor: 1
|
||||
@ -105,57 +97,10 @@ Item {
|
||||
},
|
||||
State {
|
||||
name: "off"
|
||||
PropertyChanges {
|
||||
target: mainStack
|
||||
opacity: 0
|
||||
}
|
||||
PropertyChanges {
|
||||
target: footer
|
||||
opacity: 0
|
||||
}
|
||||
PropertyChanges {
|
||||
target: wallpaperFader
|
||||
factor: 0
|
||||
}
|
||||
}
|
||||
]
|
||||
transitions: [
|
||||
Transition {
|
||||
from: "off"
|
||||
to: "on"
|
||||
//Note: can't use animators as they don't play well with parallelanimations
|
||||
ParallelAnimation {
|
||||
NumberAnimation {
|
||||
target: mainStack
|
||||
property: "opacity"
|
||||
duration: units.longDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
NumberAnimation {
|
||||
target: footer
|
||||
property: "opacity"
|
||||
duration: units.longDuration
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
},
|
||||
Transition {
|
||||
from: "on"
|
||||
to: "off"
|
||||
ParallelAnimation {
|
||||
NumberAnimation {
|
||||
target: mainStack
|
||||
property: "opacity"
|
||||
duration: 500
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
NumberAnimation {
|
||||
target: footer
|
||||
property: "opacity"
|
||||
duration: 500
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user