adding background image

This commit is contained in:
Wayne Chen 2018-11-12 16:23:12 -08:00
parent ea325acef9
commit 206c1d5b53
5 changed files with 25 additions and 1 deletions

View file

@ -20,7 +20,8 @@ FocusScope {
id: root
HifiStylesUit.HifiConstants { id: hifi }
objectName: "LoginDialog"
visible: true
property bool shown: true
visible: shown
anchors.fill: parent
@ -49,6 +50,13 @@ FocusScope {
}
}
Image {
id: loginDialogBackground
source: "LoginDialog/background.png"
anchors.fill: parent
z: -2
}
Keys.onPressed: {
if (!visible) {
return

View file

@ -215,6 +215,7 @@ Item {
}
onFocusChanged: {
root.text = "";
root.isPassword = false;
}
}
@ -263,6 +264,7 @@ Item {
}
onFocusChanged: {
root.text = "";
root.isPassword = false;
}
}
HifiControlsUit.TextField {

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View file

@ -50,6 +50,13 @@ FocusScope {
}
}
Image {
id: loginDialogBackground
source: "LoginDialog/background.png"
anchors.fill: parent
z: -2
}
Timer {
id: keyboardTimer
repeat: false

View file

@ -89,6 +89,13 @@ FocusScope {
}
}
Image {
id: loginDialogBackground
source: "../LoginDialog/background.png"
anchors.fill: parent
z: -2
}
HifiControlsUit.Keyboard {
id: loginKeyboard
raised: root.keyboardEnabled && root.keyboardRaised