Update qt launcher to work with Windows scaling

This commit is contained in:
Ryan Huffman 2019-10-17 15:06:43 -07:00
parent f4f634f67b
commit 2504ab2c8c
7 changed files with 11 additions and 9 deletions

View file

@ -14,7 +14,7 @@ Button {
property int backgroundWidth: 2 property int backgroundWidth: 2
font.family: "Graphik Semibold" font.family: "Graphik Semibold"
font.pointSize: 12 font.pixelSize: 15
background: Rectangle { background: Rectangle {
implicitWidth: 100 implicitWidth: 100

View file

@ -7,7 +7,7 @@ TextField {
height: 50 height: 50
font.family: "Graphik Regular" font.family: "Graphik Regular"
font.pointSize: 10.5 font.pixelSize: 14
color: (text.length == 0 || !enabled) ? "#7e8c81" : "#000000" color: (text.length == 0 || !enabled) ? "#7e8c81" : "#000000"
property bool togglePasswordField: false property bool togglePasswordField: false

View file

@ -3,6 +3,6 @@ import QtQuick 2.1
Text { Text {
font.family: "Graphik Semibold" font.family: "Graphik Semibold"
font.pointSize: 24 font.pixelSize: 32
color: "#ffffff" color: "#ffffff"
} }

View file

@ -5,7 +5,7 @@ Text {
text: "High Fidelity" text: "High Fidelity"
font.bold: true font.bold: true
font.family: "Graphik Semibold" font.family: "Graphik Semibold"
font.pointSize: 14 font.pixelSize: 17
font.letterSpacing: -1 font.letterSpacing: -1
color: "#FFFFFF" color: "#FFFFFF"
} }

View file

@ -5,7 +5,7 @@ Text {
id: root id: root
font.family: "Graphik Regular" font.family: "Graphik Regular"
font.pointSize: 10.5 font.pixelSize: 14
color: "#C4C4C4" color: "#C4C4C4"
linkColor: color linkColor: color

View file

@ -7,8 +7,6 @@ import "HFControls"
Item { Item {
id: root id: root
width: 627
height: 540
Loader { Loader {
anchors.fill: parent anchors.fill: parent
id: loader id: loader
@ -34,8 +32,6 @@ Item {
HFTextRegular { HFTextRegular {
id: buildInfo id: buildInfo
font.pixelSize: 12
anchors { anchors {
leftMargin: 10 leftMargin: 10
rightMargin: 10 rightMargin: 10

View file

@ -37,6 +37,12 @@ Launcher::Launcher(int& argc, char**argv) : QGuiApplication(argc, argv) {
_launcherWindow->setWidth(627); _launcherWindow->setWidth(627);
_launcherWindow->setResizeMode(QQuickView::SizeRootObjectToView); _launcherWindow->setResizeMode(QQuickView::SizeRootObjectToView);
_launcherWindow->show(); _launcherWindow->show();
auto window = allWindows()[0];
window->setMaximumHeight(540);
window->setMaximumWidth(627);
window->setMinimumHeight(540);
window->setMinimumWidth(627);
} }
Launcher::~Launcher() { Launcher::~Launcher() {