From 5bb95053fb537c04b9cb4333ec517604564d6f56 Mon Sep 17 00:00:00 2001 From: dsc Date: Sun, 11 Apr 2021 19:40:52 +0200 Subject: [PATCH] Fixes DPI scaling and added quirc submodule --- .gitmodules | 3 +++ contrib/quirc | 1 + src/main.cpp | 9 +-------- src/vr/main.qml | 6 +++--- src/vr/qml/AboutPage.qml | 4 ++-- src/vr/qml/DashboardPage.qml | 6 +++--- src/vr/qml/common/MyDialogOkCancelPopup.qml | 2 +- src/vr/qml/common/MyDialogOkPopup.qml | 2 +- src/vr/qml/common/MyNumPad.qml | 2 +- src/vr/qml/common/MyNumPadButton.qml | 2 +- src/vr/qml/common/MyPushButton.qml | 2 +- src/vr/qml/common/MyStackViewPage.qml | 15 ++++++++------- src/vr/qml/common/MyText.qml | 2 +- src/vr/qml/wallet/HistoryTable.qml | 6 +++--- src/vr/qml/wallet/ReceivePage.qml | 8 ++++---- src/vr/qml/wallet/send/SendPageNavBack.qml | 2 +- src/vr/qml/wallet/send/SendPagePIN.qml | 6 +++--- src/vr/qml/wallet/send/SendPageTransfer.qml | 4 ++-- 18 files changed, 40 insertions(+), 42 deletions(-) create mode 160000 contrib/quirc diff --git a/.gitmodules b/.gitmodules index 294bfc9..4a20536 100644 --- a/.gitmodules +++ b/.gitmodules @@ -5,3 +5,6 @@ path = monero url = https://git.wownero.com/wownero/wownero branch = wowlet +[submodule "contrib/quirc"] + path = contrib/quirc + url = https://github.com/dlbeer/quirc.git diff --git a/contrib/quirc b/contrib/quirc new file mode 160000 index 0000000..9c0f555 --- /dev/null +++ b/contrib/quirc @@ -0,0 +1 @@ +Subproject commit 9c0f555acb2531d818f2c405044418fc75379fb2 diff --git a/src/main.cpp b/src/main.cpp index 65d28d6..7654e4e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -120,14 +120,7 @@ if (AttachConsole(ATTACH_PARENT_PROCESS)) { if(openVREnabled) { #ifdef HAS_OPENVR - // @TODO: custom DPI / AA -// QCoreApplication::setAttribute( Qt::AA_UseDesktopOpenGL ); -// QCoreApplication::setAttribute( Qt::AA_Use96Dpi ); - if(qgetenv("scale") == "1") - QCoreApplication::setAttribute( Qt::AA_EnableHighDpiScaling ); - if(qgetenv("noscale") == "1") - QCoreApplication::setAttribute( Qt::AA_DisableHighDpiScaling ); - + QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QApplication vr_app(argc, argv); auto *ctx = new AppContext(&parser); auto *vr = new wowletvr::WowletVR(ctx, &parser, &vr_app); diff --git a/src/vr/main.qml b/src/vr/main.qml index 819613b..61472db 100644 --- a/src/vr/main.qml +++ b/src/vr/main.qml @@ -105,7 +105,7 @@ Rectangle { id: enterPasswordDialog dialogTitle: "Enter Wallet Password" dialogWidth: 700 - dialogHeight: 380 + dialogHeight: 280 dialogContentItem: ColumnLayout { RowLayout { @@ -202,7 +202,7 @@ Rectangle { MyText { Layout.topMargin: 20 Layout.leftMargin: 16 - fontSize: 16 + fontSize: 24 fontColor: Style.fontColorDimmed text: "The password field is optional." } @@ -236,7 +236,7 @@ Rectangle { MyText { text: "Credits" - fontSize: 12 + fontSize: 16 opacity: 0.3 anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter diff --git a/src/vr/qml/AboutPage.qml b/src/vr/qml/AboutPage.qml index c50cc6e..9c50a6d 100644 --- a/src/vr/qml/AboutPage.qml +++ b/src/vr/qml/AboutPage.qml @@ -47,7 +47,7 @@ ColumnLayout { Layout.leftMargin: 40 Layout.rightMargin: 40 Layout.fillWidth: true - fontSize: 14 + fontSize: 21 text: "Shoutouts: matzman666, qvqc, ez, Gatto, RAGEHAÜZ, cisme, wowario, lza_menace, jwinterm, nioc, asymptotically, azy, selsta, kico, laura, thrmo, rottensox, solar, bl4sty, scoobybejesus" wrap: true } @@ -56,7 +56,7 @@ ColumnLayout { Layout.leftMargin: 40 Layout.rightMargin: 40 Layout.fillWidth: true - fontSize: 14 + fontSize: 21 text: "dsc - April 2021" wrap: true } diff --git a/src/vr/qml/DashboardPage.qml b/src/vr/qml/DashboardPage.qml index 1ab1973..dd7fe54 100644 --- a/src/vr/qml/DashboardPage.qml +++ b/src/vr/qml/DashboardPage.qml @@ -27,7 +27,7 @@ ColumnLayout { RowLayout { MyText { text: "Welcome to Wowlet VR" - font.pointSize: 24 + font.pointSize: 36 Layout.leftMargin: 0 } @@ -44,7 +44,7 @@ ColumnLayout { MyText{ anchors.right: parent.right anchors.bottom: parent.bottom - fontSize: 14 + fontSize: 21 text: "Version beta (Qt " + qtRuntimeVersion + ")" } } @@ -119,7 +119,7 @@ ColumnLayout { return currentItem['fileName'].replace(".keys", ""); } } - font.pointSize: 14 + font.pointSize: 21 anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top anchors.topMargin: 14 diff --git a/src/vr/qml/common/MyDialogOkCancelPopup.qml b/src/vr/qml/common/MyDialogOkCancelPopup.qml index 489c12d..3c799cf 100755 --- a/src/vr/qml/common/MyDialogOkCancelPopup.qml +++ b/src/vr/qml/common/MyDialogOkCancelPopup.qml @@ -39,7 +39,7 @@ Popup { implicitWidth: dialogWidth implicitHeight: dialogHeight anchors.centerIn: parent - radius: 24 + radius: 36 color: Style.backgroundColor border.color: Style.fontColorDimmed border.width: 2 diff --git a/src/vr/qml/common/MyDialogOkPopup.qml b/src/vr/qml/common/MyDialogOkPopup.qml index 8202554..e7fdc85 100755 --- a/src/vr/qml/common/MyDialogOkPopup.qml +++ b/src/vr/qml/common/MyDialogOkPopup.qml @@ -17,7 +17,7 @@ Popup { property int dialogHeight: 300 property Item dialogContentItem: MyText { - fontSize: 16 + fontSize: 36 text: dialogText horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter diff --git a/src/vr/qml/common/MyNumPad.qml b/src/vr/qml/common/MyNumPad.qml index 24337a5..7e8b5f4 100644 --- a/src/vr/qml/common/MyNumPad.qml +++ b/src/vr/qml/common/MyNumPad.qml @@ -123,7 +123,7 @@ ColumnLayout { opacity: root.enabled ? 1 : disabledOpacity Layout.preferredWidth: root.compact ? 106 : 230 - fontSize: 16 + fontSize: 36 text: root.compact ? "C" : "Clear" onClicked: { clearPress(); diff --git a/src/vr/qml/common/MyNumPadButton.qml b/src/vr/qml/common/MyNumPadButton.qml index 7d17023..9fc7508 100644 --- a/src/vr/qml/common/MyNumPadButton.qml +++ b/src/vr/qml/common/MyNumPadButton.qml @@ -5,7 +5,7 @@ import QtQuick.Layouts 1.3 Rectangle { id: root property string text: "" - property int fontSize: 22 + property int fontSize: 32 property alias mouseArea: mouseArea property alias btnTextColor: btnText.fontColor diff --git a/src/vr/qml/common/MyPushButton.qml b/src/vr/qml/common/MyPushButton.qml index a4aa966..bbe499a 100755 --- a/src/vr/qml/common/MyPushButton.qml +++ b/src/vr/qml/common/MyPushButton.qml @@ -51,7 +51,7 @@ Item { Layout.fillWidth: root.hasIcon ? true : false Layout.alignment: root.hasIcon ? Qt.AlignLeft : Qt.AlignHCenter text: root.text - fontSize: 16 + fontSize: 26 fontColor: Style.btnTextColor } } diff --git a/src/vr/qml/common/MyStackViewPage.qml b/src/vr/qml/common/MyStackViewPage.qml index 2ad651b..0ad0566 100755 --- a/src/vr/qml/common/MyStackViewPage.qml +++ b/src/vr/qml/common/MyStackViewPage.qml @@ -30,6 +30,7 @@ Rectangle { Layout.preferredHeight: 70 RowLayout { + spacing: 20 anchors.fill: parent Rectangle { @@ -53,12 +54,12 @@ Rectangle { id: headerTitleContainer color: "transparent" Layout.preferredHeight: 50 - Layout.preferredWidth: headerTitle.width + Layout.preferredWidth: headerTitle.width + 20 MyText { id: headerTitle text: headerText - font.pointSize: 26 + font.pointSize: 38 anchors.verticalCenter: parent.verticalCenter fontColor: Style.fontColorBright } @@ -105,7 +106,7 @@ Rectangle { MyText{ anchors.right: parent.right anchors.bottom: parent.bottom - fontSize: 14 + fontSize: 30 fontBold: true text: appWindow.balanceFormatted } @@ -160,7 +161,7 @@ Rectangle { MyText { Layout.leftMargin: 40 - fontSize: 14 + fontSize: 21 text: appWindow.statusText color: Style.fontColorDimmed } @@ -176,7 +177,7 @@ Rectangle { spacing: 0 MyText { - fontSize: 14 + fontSize: 21 text: "Daemon: " color: Style.fontColorDimmed } @@ -211,7 +212,7 @@ Rectangle { spacing: 0 MyText { - fontSize: 14 + fontSize: 21 text: "WS: " color: Style.fontColorDimmed } @@ -231,7 +232,7 @@ Rectangle { } MyText { - fontSize: 14 + fontSize: 21 text: { let rtn = "Balance: "; try { diff --git a/src/vr/qml/common/MyText.qml b/src/vr/qml/common/MyText.qml index b0ee771..e85f468 100755 --- a/src/vr/qml/common/MyText.qml +++ b/src/vr/qml/common/MyText.qml @@ -4,7 +4,7 @@ import "." Text { property bool wrap: false - property int fontSize: 16 + property int fontSize: 24 property bool fontBold: false property string fontColor: Style.fontColor diff --git a/src/vr/qml/wallet/HistoryTable.qml b/src/vr/qml/wallet/HistoryTable.qml index d925144..bfca25e 100755 --- a/src/vr/qml/wallet/HistoryTable.qml +++ b/src/vr/qml/wallet/HistoryTable.qml @@ -112,7 +112,7 @@ Item { MyText { // date anchors.verticalCenter: parent.verticalCenter - fontSize: 12 + fontSize: 22 fontColor: Style.fontColorBright text: date @@ -129,7 +129,7 @@ Item { MyText { anchors.verticalCenter: parent.verticalCenter - fontSize: 14 + fontSize: 22 text: description !== "" ? description : "..." fontColor: description !== "" ? Style.fontColorBright : Style.fontColorDimmed Component.onCompleted: { @@ -152,7 +152,7 @@ Item { anchors.rightMargin: 10 anchors.verticalCenter: parent.verticalCenter - fontSize: 14 + fontSize: 24 fontBold: true text: amount fontColor: !isout ? Style.historyFontColorPlusAmount : Style.historyFontColorMinAmount diff --git a/src/vr/qml/wallet/ReceivePage.qml b/src/vr/qml/wallet/ReceivePage.qml index 3e77a56..73e1c59 100755 --- a/src/vr/qml/wallet/ReceivePage.qml +++ b/src/vr/qml/wallet/ReceivePage.qml @@ -29,7 +29,7 @@ MyStackViewPage { MyText { width: parent.width wrap: true - fontSize: 14 + fontSize: 21 fontColor: Style.fontColorBright text: "Give the following 4 digit PIN to the person that is sending you Wownero. PIN's are valid for 10 minutes and automatically renew." } @@ -46,7 +46,7 @@ MyStackViewPage { id: statusText width: parent.width visible: true - fontSize: 14 + fontSize: 21 fontColor: Style.fontColorBright text: "Generating PIN..." } @@ -56,7 +56,7 @@ MyStackViewPage { text: "- - - -" color: Style.fontColor font.bold: true - font.pointSize: 40 + font.pointSize: 60 leftPadding: 20 rightPadding: 20 @@ -92,7 +92,7 @@ MyStackViewPage { MyText { width: parent.width - fontSize: 14 + fontSize: 21 wrap: true fontColor: Style.fontColorBright text: "Alternatively, you may use one of the following methods to retreive your address." diff --git a/src/vr/qml/wallet/send/SendPageNavBack.qml b/src/vr/qml/wallet/send/SendPageNavBack.qml index 994486c..107fbce 100644 --- a/src/vr/qml/wallet/send/SendPageNavBack.qml +++ b/src/vr/qml/wallet/send/SendPageNavBack.qml @@ -38,7 +38,7 @@ RowLayout { Layout.alignment: Qt.AlignLeft fontBold: true text: "back" - fontSize: 16 + fontSize: 24 } } diff --git a/src/vr/qml/wallet/send/SendPagePIN.qml b/src/vr/qml/wallet/send/SendPagePIN.qml index 6cc3ea2..aa32607 100644 --- a/src/vr/qml/wallet/send/SendPagePIN.qml +++ b/src/vr/qml/wallet/send/SendPagePIN.qml @@ -55,7 +55,7 @@ ColumnLayout { text: (root.pin[0] || ".") + " " + (root.pin[1] || ".") + " " + (root.pin[2] || ".") + " " + (root.pin[3] || "."); color: Style.fontColor font.bold: true - font.pointSize: 40 + font.pointSize: 60 leftPadding: 20 rightPadding: 20 @@ -91,7 +91,7 @@ ColumnLayout { Layout.fillWidth: true MyText { - fontSize: 18 + fontSize: 22 fontColor: Style.fontColorBright text: "Waiting on input..." } @@ -105,7 +105,7 @@ ColumnLayout { Layout.fillWidth: true MyText { - fontSize: 18 + fontSize: 22 fontColor: Style.fontColorBright text: "Looking up address..." } diff --git a/src/vr/qml/wallet/send/SendPageTransfer.qml b/src/vr/qml/wallet/send/SendPageTransfer.qml index 0e5c963..ac3e1f5 100644 --- a/src/vr/qml/wallet/send/SendPageTransfer.qml +++ b/src/vr/qml/wallet/send/SendPageTransfer.qml @@ -125,7 +125,7 @@ ColumnLayout { Layout.preferredHeight: 68 MyText { - fontSize: 24 + fontSize: 32 fontColor: Style.fontColorBright text: { let rtn = ""; @@ -172,7 +172,7 @@ ColumnLayout { MyText { id: fiatText - fontSize: 18 + fontSize: 26 fontColor: Style.fontColorBright text: { let rtn = "";