adding cancel button and signed in checkbox

This commit is contained in:
Wayne Chen 2018-09-07 11:22:31 -07:00
parent e1541fd7e0
commit d9495275cc
4 changed files with 37 additions and 6 deletions

View file

@ -23,6 +23,7 @@ ModalWindow {
objectName: "LoginDialog"
implicitWidth: 520
implicitHeight: 320
closeButtonVisible: true
destroyOnCloseButton: true
destroyOnHidden: true
visible: true

View file

@ -234,6 +234,23 @@ Item {
onHeightChanged: d.resize(); onWidthChanged: d.resize();
anchors.horizontalCenter: parent.horizontalCenter
CheckBox {
id: autoLogoutCheckbox;
checked: Settings.getValue("wallet/autoLogout", true);
text: "Keep me signed in"
boxSize: 20;
labelFontSize: 15;
color: hifi.colors.black;
onCheckedChanged: {
Settings.setValue("wallet/autoLogout", !checked);
if (checked) {
Settings.setValue("wallet/savedUsername", "");
} else {
Settings.setValue("wallet/savedUsername", Account.username);
}
}
}
Button {
id: linkAccountButton
anchors.verticalCenter: parent.verticalCenter
@ -244,12 +261,6 @@ Item {
onClicked: linkAccountBody.login()
}
Button {
anchors.verticalCenter: parent.verticalCenter
text: qsTr("Cancel")
onClicked: root.tryDestroy()
}
}
Row {

View file

@ -94,5 +94,23 @@ Frame {
color: hifi.colors.lightGray
}
}
GlyphButton {
id: closeButton
visible: window.closeButtonVisible
width: 30
y: -hifi.dimensions.modalDialogTitleHeight
anchors {
top: parent.top
right: parent.right
topMargin: 10
rightMargin: 10
}
glyph: hifi.glyphs.close
onClicked: {
window.destroy();
}
}
}
}

View file

@ -19,6 +19,7 @@ ScrollingWindow {
destroyOnHidden: true
frame: ModalFrame { }
property bool closeButtonVisible: false
property int colorScheme: hifi.colorSchemes.light
property bool draggable: false