From 9abc9f5f70d254cf7944e20f05f9cca0c9efc133 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Thu, 3 Oct 2019 12:16:18 -0700 Subject: [PATCH] Update qt launcher style and fix display name being set to anon --- launchers/qt/resources/qml/Download.qml | 43 ++++--------------- .../qt/resources/qml/DownloadFinished.qml | 20 +++------ .../qml/HFBase/CreateAccountBase.qml | 14 +----- launchers/qt/resources/qml/HFBase/Error.qml | 35 ++++++--------- .../qt/resources/qml/HFBase/LoginBase.qml | 14 +----- .../resources/qml/HFControls/HFTextLogo.qml | 14 ++++++ launchers/qt/resources/qml/root.qml | 8 ++-- launchers/qt/src/Helper_windows.cpp | 5 ++- 8 files changed, 49 insertions(+), 104 deletions(-) create mode 100644 launchers/qt/resources/qml/HFControls/HFTextLogo.qml diff --git a/launchers/qt/resources/qml/Download.qml b/launchers/qt/resources/qml/Download.qml index 8303121479..04c2adacd2 100644 --- a/launchers/qt/resources/qml/Download.qml +++ b/launchers/qt/resources/qml/Download.qml @@ -1,5 +1,6 @@ import QtQuick 2.3 import QtQuick.Controls 2.1 +import "HFControls" Item { id: root @@ -24,7 +25,7 @@ Item { anchors { top: root.top - topMargin: 48 + topMargin: 98 horizontalCenter: root.horizontalCenter } @@ -38,14 +39,10 @@ Item { } } - Text { + HFTextHeader { id: firstText - width: 300 - height: 41 - font.family: "Graphik" - font.pixelSize: 28 + text: "Setup will take a moment" - color: "#FFFFFF" anchors { top: logo.bottom @@ -54,16 +51,14 @@ Item { } } - Text { + HFTextRegular { id: secondText - font.family: "Graphik" - font.pixelSize: 14 - text: "We're getting your headquaters ready" - color: "#FFFFFF" + + text: "We're getting everything setup for you." anchors { top: firstText.bottom - topMargin: 14 + topMargin: 8 horizontalCenter: logo.horizontalCenter } } @@ -101,28 +96,6 @@ Item { } } - - Text { - width: 100 - height: 17 - - text: "High Fidelity" - font.bold: true - font.family: "Graphik" - font.pixelSize: 24 - font.letterSpacing: -1 - color: "#FFFFFF" - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - - anchors { - bottom: root.bottom - bottomMargin: 15 - left: root.left - leftMargin: 30 - } - } - Component.onCompleted: { root.parent.setStateInfoState("right"); root.parent.setBuildInfoState("left"); diff --git a/launchers/qt/resources/qml/DownloadFinished.qml b/launchers/qt/resources/qml/DownloadFinished.qml index ecd2e6d0c2..efe5b26925 100644 --- a/launchers/qt/resources/qml/DownloadFinished.qml +++ b/launchers/qt/resources/qml/DownloadFinished.qml @@ -4,6 +4,7 @@ import "HFControls" Item { id: root + anchors.centerIn: parent Image { @@ -17,7 +18,7 @@ Item { } - Image { + Image { id: logo width: 132 height: 134 @@ -25,21 +26,15 @@ Item { anchors { top: root.top - topMargin: 84 + topMargin: 144 horizontalCenter: root.horizontalCenter } } - Text { + HFTextHeader { 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 @@ -48,13 +43,8 @@ Item { } } - Text { + HFTextRegular { 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 diff --git a/launchers/qt/resources/qml/HFBase/CreateAccountBase.qml b/launchers/qt/resources/qml/HFBase/CreateAccountBase.qml index 8b429bae26..65f983074a 100644 --- a/launchers/qt/resources/qml/HFBase/CreateAccountBase.qml +++ b/launchers/qt/resources/qml/HFBase/CreateAccountBase.qml @@ -191,19 +191,7 @@ Item { } } - Text { - width: 100 - height: 17 - - text: "High Fidelity" - font.bold: true - font.family: "Graphik" - font.pixelSize: 24 - font.letterSpacing: -1 - color: "#FFFFFF" - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - + HFTextLogo { anchors { bottom: root.bottom bottomMargin: 46 diff --git a/launchers/qt/resources/qml/HFBase/Error.qml b/launchers/qt/resources/qml/HFBase/Error.qml index 09df9e39a7..030963f64e 100644 --- a/launchers/qt/resources/qml/HFBase/Error.qml +++ b/launchers/qt/resources/qml/HFBase/Error.qml @@ -26,20 +26,19 @@ Item { anchors { top: root.top - topMargin: 84 + topMargin: 98 horizontalCenter: root.horizontalCenter } } - Text { + HFTextHeader { 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 @@ -47,16 +46,17 @@ Item { } } - Text { + HFTextRegular { 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 @@ -69,8 +69,7 @@ Item { id: button width: 166 height: 35 - font.family: "Graphik" - font.pixelSize: 18 + text: "Restart" anchors { @@ -85,19 +84,9 @@ Item { } - Text { + HFTextLogo { 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 diff --git a/launchers/qt/resources/qml/HFBase/LoginBase.qml b/launchers/qt/resources/qml/HFBase/LoginBase.qml index 109e6e50b1..69c712b887 100644 --- a/launchers/qt/resources/qml/HFBase/LoginBase.qml +++ b/launchers/qt/resources/qml/HFBase/LoginBase.qml @@ -165,19 +165,7 @@ Item { } } - Text { - width: 100 - height: 17 - - text: "High Fidelity" - font.bold: true - font.family: "Graphik" - font.pixelSize: 18 - font.letterSpacing: -1 - color: "#FFFFFF" - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - + HFTextLogo { anchors { bottom: root.bottom bottomMargin: 58 diff --git a/launchers/qt/resources/qml/HFControls/HFTextLogo.qml b/launchers/qt/resources/qml/HFControls/HFTextLogo.qml new file mode 100644 index 0000000000..f3c7468373 --- /dev/null +++ b/launchers/qt/resources/qml/HFControls/HFTextLogo.qml @@ -0,0 +1,14 @@ +import QtQuick 2.3 +import QtQuick 2.1 + +Text { + width: 100 + height: 17 + + text: "High Fidelity" + font.bold: true + font.family: "Graphik Semibold" + font.pointSize: 14 + font.letterSpacing: -1 + color: "#FFFFFF" +} diff --git a/launchers/qt/resources/qml/root.qml b/launchers/qt/resources/qml/root.qml index 2aa2a34af8..ba39ac3cda 100644 --- a/launchers/qt/resources/qml/root.qml +++ b/launchers/qt/resources/qml/root.qml @@ -35,7 +35,7 @@ Item { loader.source = url; } - Text { + HFTextRegular { id: stateInfo font.pixelSize: 12 @@ -66,7 +66,7 @@ Item { ] } - Text { + HFTextRegular { id: buildInfo font.pixelSize: 12 @@ -80,8 +80,8 @@ Item { bottom: root.bottom } - color: "#777" - text: "v." + LauncherState.buildVersion; + color: "#666" + text: "V." + LauncherState.buildVersion; states: [ State { diff --git a/launchers/qt/src/Helper_windows.cpp b/launchers/qt/src/Helper_windows.cpp index 743e0681e7..f31f5c7c7c 100644 --- a/launchers/qt/src/Helper_windows.cpp +++ b/launchers/qt/src/Helper_windows.cpp @@ -18,10 +18,13 @@ void launchClient(const QString& clientPath, const QString& homePath, const QStr QString params = "--url \"" + homePath + "\"" + " --setBookmark \"hqhome=" + homePath + "\"" + " --defaultScriptsOverride \"file:///" + defaultScriptsPath + "\"" - + " --displayName \"" + displayName + "\"" + " --cache \"" + contentCachePath + "\"" + " --suppress-settings-reset --no-launcher --no-updater"; + if (!displayName.isEmpty()) { + params += " --displayName \"" + displayName + "\""; + } + if (!loginResponseToken.isEmpty()) { params += " --tokens \"" + loginResponseToken.replace("\"", "\\\"") + "\""; }