mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
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>
This commit is contained in:
parent
8c0af2b147
commit
b0a4e8a443
1 changed files with 10 additions and 1 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue