aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2021-04-16 12:57:08 -0500
committerluigi1111 <luigi1111w@gmail.com>2021-04-16 12:57:08 -0500
commita84d7bd2cb3f14f8efb4fd98a99a389ca91bccba (patch)
tree6360217ed485f50d4ede7220996971c1013a3348 /src
parent84b9264d1d7fe92a6921547e72a3eb1c33af44b6 (diff)
parentba62f9c6862aa2a7447fe4e077ca179f85b5b5e4 (diff)
downloadmonzero-gui-a84d7bd2cb3f14f8efb4fd98a99a389ca91bccba.tar.gz
monzero-gui-a84d7bd2cb3f14f8efb4fd98a99a389ca91bccba.tar.xz
monzero-gui-a84d7bd2cb3f14f8efb4fd98a99a389ca91bccba.zip
Merge pull request #3404
ba62f9c main: omit QML Screen type, use QGuiApplication::primaryScreen() instead (xiphon)
Diffstat (limited to 'src')
-rw-r--r--src/main/main.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/main.cpp b/src/main/main.cpp
index 10cf5a73..e3aca5e9 100644
--- a/src/main/main.cpp
+++ b/src/main/main.cpp
@@ -331,7 +331,7 @@ Verify update binary using 'shasum'-compatible (SHA256 algo) output signed by tw
// screen settings
// Mobile is designed on 128dpi
qreal ref_dpi = 128;
- QRect geo = QGuiApplication::primaryScreen()->availableGeometry();
+ QSize screenAvailableSize = QGuiApplication::primaryScreen()->availableVirtualSize();
QRect rect = QGuiApplication::primaryScreen()->geometry();
qreal dpi = QGuiApplication::primaryScreen()->logicalDotsPerInch();
qreal physicalDpi = QGuiApplication::primaryScreen()->physicalDotsPerInch();
@@ -354,6 +354,7 @@ Verify update binary using 'shasum'-compatible (SHA256 algo) output signed by tw
qWarning().nospace().noquote() << "Qt:" << QT_VERSION_STR << " GUI:" << GUI_VERSION
<< " | screen: " << rect.width() << "x" << rect.height()
+ << " - available: " << screenAvailableSize
<< " - dpi: " << dpi << " - ratio:" << calculated_ratio;
// registering types for QML
@@ -464,8 +465,8 @@ Verify update binary using 'shasum'-compatible (SHA256 algo) output signed by tw
engine.rootContext()->setContextProperty("isOpenGL", isOpenGL);
engine.rootContext()->setContextProperty("isTails", isTails);
- engine.rootContext()->setContextProperty("screenWidth", geo.width());
- engine.rootContext()->setContextProperty("screenHeight", geo.height());
+ engine.rootContext()->setContextProperty("screenAvailableWidth", screenAvailableSize.width());
+ engine.rootContext()->setContextProperty("screenAvailableHeight", screenAvailableSize.height());
#ifndef Q_OS_IOS
const QString desktopFolder = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation);