diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2019-09-13 21:41:42 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-09-21 15:13:10 -0700 |
commit | b0a4e8a443837c089183a397258f618b46cd44a5 (patch) | |
tree | ffdae06a77b207aa0523e908c4dcf2c18e688933 | |
parent | 8c0af2b1474e860e7893cabaa582fc3bf6fa2004 (diff) | |
download | subsurface-b0a4e8a443837c089183a397258f618b46cd44a5.tar.gz |
Mobile: allow setting a width via environment variable
This should make it much easier to debug and hopefully fix some of the odd
scenarios where we get font sizes (or even the screen layout) wrong.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | subsurface-helper.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/subsurface-helper.cpp b/subsurface-helper.cpp index 5671ffc58..b60d015dc 100644 --- a/subsurface-helper.cpp +++ b/subsurface-helper.cpp @@ -123,8 +123,17 @@ void run_ui() manager->screenChanged(screen); qDebug() << "qqwindow screen has ldpi/pdpi" << screen->logicalDotsPerInch() << screen->physicalDotsPerInch(); #if !defined(Q_OS_ANDROID) && !defined(Q_OS_IOS) + int width = 800; + if (qEnvironmentVariableIsSet("SUBSURFACE_MOBILE_WIDTH")) { + bool ok; + int width_override = qEnvironmentVariableIntValue("SUBSURFACE_MOBILE_WIDTH", &ok); + if (ok) { + width = width_override; + qDebug() << "overriding window width:" << width; + } + } qml_window->setHeight(1200); - qml_window->setWidth(800); + qml_window->setWidth(width); #endif // not Q_OS_ANDROID and not Q_OS_IOS qml_window->show(); LOG_STP("run_ui running exec"); |