diff --git a/launchers/qt/resources/qml/DownloadFinished.qml b/launchers/qt/resources/qml/DownloadFinished.qml new file mode 100644 index 0000000000..f817137a8c --- /dev/null +++ b/launchers/qt/resources/qml/DownloadFinished.qml @@ -0,0 +1,68 @@ +import QtQuick 2.3 +import QtQuick.Controls 2.1 +import "HFControls" + +Item { + id: root + anchors.centerIn: parent + + Image { + anchors.centerIn: parent + width: parent.width + height: parent.height + mirror: true + source: "qrc:/images/hifi_window@2x.png" + transformOrigin: Item.Center + rotation: 0 + } + + + Image { + id: logo + width: 132 + height: 134 + source: "qrc:/images/HiFi_Voxel.png" + + anchors { + top: root.top + topMargin: 84 + horizontalCenter: root.horizontalCenter + } + } + + Text { + id: header + width: 87 + height: 31 + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + font.family: "Graphik" + font.bold: true + font.pixelSize: 28 + color: "#FFFFFF" + text: "You're all set!" + anchors { + top: logo.bottom + topMargin: 26 + horizontalCenter: logo.horizontalCenter + } + } + + Text { + id: description + width: 100 + height: 40 + font.family: "Graphik" + font.pixelSize: 14 + color: "#FFFFFF" + text: "We will see you in world." + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + anchors { + top: header.bottom + topMargin: 8 + horizontalCenter: header.horizontalCenter + } + } + +} diff --git a/launchers/qt/resources/qml/HFBase/CreateAccountBase.qml b/launchers/qt/resources/qml/HFBase/CreateAccountBase.qml new file mode 100644 index 0000000000..563e12f924 --- /dev/null +++ b/launchers/qt/resources/qml/HFBase/CreateAccountBase.qml @@ -0,0 +1,159 @@ +import QtQuick 2.3 +import QtQuick 2.1 +import "../HFControls" + + +Item { + id: root + anchors.centerIn: parent + property string titleText: "Create your account" + property string usernamePlaceholder: "User name" + property string passwordPlaceholder: "Set a password" + property int marginLeft: root.width * 0.15 + + Image { + anchors.centerIn: parent + width: parent.width + height: parent.height + mirror: true + source: "qrc:/images/hifi_window@2x.png" + transformOrigin: Item.Center + rotation: 180 + } + + Text { + id: title + width: 325 + height: 26 + font.family: "Graphik" + font.bold: true + font.pixelSize: 24 + color: "#FFFFFF" + text: root.titleText + anchors { + top: root.top + topMargin: 29 + left: root.left + leftMargin: root.marginLeft + } + } + + Text { + id: instruction + width: 425 + height: 22 + font.family: "Graphik" + font.pixelSize: 10 + color: "#C4C4C4" + text: "Use the email address that you regisetered with." + anchors { + left: root.left + leftMargin: root.marginLeft + top: title.bottom + topMargin: 9 + } + } + + HFTextField { + id: organization + width: 353 + height: 40 + font.family: "Graphik" + font.pixelSize: 18 + placeholderText: "Organization name" + color: "#808080" + seperatorColor: Qt.rgba(1, 1, 1, 0.3) + anchors { + top: instruction.bottom + left: root.left + leftMargin: root.marginLeft + topMargin: 4 + } + } + + HFTextField { + id: username + width: 353 + height: 40 + font.family: "Graphik" + font.pixelSize: 18 + placeholderText: root.usernamePlaceholder + color: "#808080" + seperatorColor: Qt.rgba(1, 1, 1, 0.3) + anchors { + top: organization.bottom + left: root.left + leftMargin: root.marginLeft + topMargin: 10 + } + } + + HFTextField { + id: passwordField + width: 353 + height: 40 + font.family: "Graphik" + font.pixelSize: 18 + placeholderText: root.passwordPlaceholder + color: "#808080" + seperatorColor: Qt.rgba(1, 1, 1, 0.3) + echoMode: TextInput.Password + anchors { + top: username.bottom + left: root.left + leftMargin: root.marginLeft + topMargin: 10 + } + } + + + Text { + id: displayNameText + text: "This is the display name other people see in world. It can be changed at \nanytime, from your profile" + font.family: "Graphik" + font.pixelSize: 10 + color: "#FFFFFF" + anchors { + top: passwordField.bottom + left: root.left + leftMargin: root.marginLeft + topMargin: 15 + } + } + + HFTextField { + id: displayName + width: 353 + height: 40 + font.family: "Graphik" + font.pixelSize: 18 + placeholderText: "Password" + color: "#C4C4C4" + seperatorColor: Qt.rgba(1, 1, 1, 0.3) + anchors { + top: displayNameText.bottom + left: root.left + leftMargin: root.marginLeft + topMargin: 8 + } + } + + HFButton { + id: button + width: 122 + height: 36 + + font.family: "Graphik" + font.pixelSize: 18 + text: "NEXT" + + anchors { + top: displayName.bottom + left: root.left + leftMargin: root.marginLeft + topMargin: 15 + } + + onClicked: LauncherState.login(username.text, password.text) + } +} diff --git a/launchers/qt/resources/qml/HFBase/Error.qml b/launchers/qt/resources/qml/HFBase/Error.qml new file mode 100644 index 0000000000..d05ef01413 --- /dev/null +++ b/launchers/qt/resources/qml/HFBase/Error.qml @@ -0,0 +1,105 @@ +import QtQuick 2.3 +import QtQuick 2.1 +import "../HFControls" + + +Item { + id: root + anchors.centerIn: parent + + Image { + anchors.centerIn: parent + width: parent.width + height: parent.height + mirror: false + source: "qrc:/images/hifi_window@2x.png" + //fillMode: Image.PreserveAspectFit + transformOrigin: Item.Center + //rotation: 90 + } + + Image { + id: logo + width: 132 + height: 134 + source: "qrc:/images/HiFi_Voxel.png" + + anchors { + top: root.top + topMargin: 84 + horizontalCenter: root.horizontalCenter + } + } + + Text { + id: header + width: 87 + height: 31 + font.family: "Graphik" + font.bold: true + font.pixelSize: 28 + color: "#FFFFFF" + text: "Uh oh." + anchors { + top: logo.bottom + topMargin: 26 + horizontalCenter: logo.horizontalCenter + } + } + + Text { + id: description + width: 100 + height: 40 + font.family: "Graphik" + font.pixelSize: 14 + color: "#FFFFFF" + text: "We seem to have a problem.\n Please restart HQ Launcher" + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + anchors { + top: header.bottom + topMargin: 8 + horizontalCenter: header.horizontalCenter + } + } + + + HFButton { + id: button + width: 166 + height: 35 + font.family: "Graphik" + font.pixelSize: 18 + text: "Restart" + + anchors { + top: description.bottom + topMargin: 15 + horizontalCenter: description.horizontalCenter + } + } + + + Text { + id: hifilogo + width: 100 + height: 18 + + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + font.family: "Graphik" + font.pixelSize: 18 + font.bold: true + color: "#FFFFFF" + + text: "High Fidelity" + anchors { + right: root.right + rightMargin: 17 + bottom: root.bottom + bottomMargin: 17 + } + } + +} diff --git a/launchers/qt/resources/qml/HFControls/HFTextField.qml b/launchers/qt/resources/qml/HFControls/HFTextField.qml index 77a6601fdf..7d25cc5193 100644 --- a/launchers/qt/resources/qml/HFControls/HFTextField.qml +++ b/launchers/qt/resources/qml/HFControls/HFTextField.qml @@ -3,7 +3,7 @@ import QtQuick.Controls 2.1 TextField { id: control - color: "#FFFFFF" + //color: "#000000" font.family: "Graphik Medium" font.pixelSize: 22 verticalAlignment: TextInput.AlignVCenter @@ -13,14 +13,8 @@ TextField { background: Item { anchors.fill: parent Rectangle { - anchors { - bottom: parent.bottom - left: parent.left - leftMargin: 7 - right: parent.right - } - height: 1 - color: control.seperatorColor + color: "#FFFFFF" + anchors.fill: parent } } } diff --git a/launchers/qt/resources/qml/root.qml b/launchers/qt/resources/qml/root.qml index 0ceda5b189..b2fdedb441 100644 --- a/launchers/qt/resources/qml/root.qml +++ b/launchers/qt/resources/qml/root.qml @@ -4,11 +4,11 @@ import QtQuick 2.3 import QtQuick.Controls 2.1 import HQLauncher 1.0 import "HFControls" -Image { +Item { id: root width: 515 - height: 450 - source: "../images/hifi_window@2x.png" + height: 390 + //source: "../images/hifi_window@2x.png" Loader { anchors.fill: parent diff --git a/launchers/qt/src/Launcher.cpp b/launchers/qt/src/Launcher.cpp index 20405d5a39..50c4a665e5 100644 --- a/launchers/qt/src/Launcher.cpp +++ b/launchers/qt/src/Launcher.cpp @@ -11,7 +11,7 @@ Launcher::Launcher(int& argc, char**argv) : QGuiApplication(argc, argv) { QString resourceBinaryLocation = QGuiApplication::applicationDirPath() + "/resources.rcc"; QResource::registerResource(resourceBinaryLocation); _launcherState = std::make_shared(); - _launcherState->setUIState(LauncherState::SPLASH_SCREEN); + _launcherState->setUIState(LauncherState::DOWNLOAD_FINSISHED); _launcherWindow = std::make_unique(); _launcherWindow->rootContext()->setContextProperty("LauncherState", _launcherState.get()); _launcherWindow->setFlags(Qt::FramelessWindowHint); diff --git a/launchers/qt/src/Launcher.h b/launchers/qt/src/Launcher.h index 2310c6ba08..7b939485d6 100644 --- a/launchers/qt/src/Launcher.h +++ b/launchers/qt/src/Launcher.h @@ -1,3 +1,4 @@ +#pragma once #include #include diff --git a/launchers/qt/src/LauncherState.cpp b/launchers/qt/src/LauncherState.cpp index 52e13bc3b7..090bf5e9c5 100644 --- a/launchers/qt/src/LauncherState.cpp +++ b/launchers/qt/src/LauncherState.cpp @@ -14,8 +14,8 @@ #include static const std::array QML_FILE_FOR_UI_STATE = - { { "qrc:/qml/SplashScreen.qml", "qrc:/qml/Login.qml", "qrc:/qml/DisplayName.qml", - "qrc:/qml/Download.qml", "qrc:/qml/DownloadFinshed.qml", "qrc:/qml/Error.qml" } }; + { { "qrc:/qml/SplashScreen.qml", "qrc:/qml/HFBase/CreateAccountBase.qml", "qrc:/qml/DisplayName.qml", + "qrc:/qml/Download.qml", "qrc:/qml/DownloadFinished.qml", "qrc:/qml/HFBase/Error.qml" } }; LauncherState::LauncherState() { // TODO Show splash screen until this request is complete @@ -61,7 +61,7 @@ LauncherState::LauncherState() { } } } - setUIState(LauncherState::LOGIN_SCREEN); + //setUIState(LauncherState::LOGIN_SCREEN); }); } diff --git a/launchers/qt/src/PathUtils.h b/launchers/qt/src/PathUtils.h new file mode 100644 index 0000000000..4c6c6e9515 --- /dev/null +++ b/launchers/qt/src/PathUtils.h @@ -0,0 +1,6 @@ +#pragma once + +class PathUtils { +public: + static resourcePath(); +};