summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2009-10-02 07:52:57 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2009-10-02 07:52:57 (GMT)
commit4cbbb0e7bec3f11654ae140e4b1c966bb6aabae6 (patch)
tree8420376e56e47ce4b8339110e123b2169148a67b /examples
parent7ea326d796a6d2ecb13b961c576c82a797d84706 (diff)
downloadQt-4cbbb0e7bec3f11654ae140e4b1c966bb6aabae6.zip
Qt-4cbbb0e7bec3f11654ae140e4b1c966bb6aabae6.tar.gz
Qt-4cbbb0e7bec3f11654ae140e4b1c966bb6aabae6.tar.bz2
Added support for -small-screen argument for Context2d example
To improve screen real-estate utilization in small screen devices, added -small-screen command line argument to the Context2d application. Task-number: QTBUG-3296 Reviewed-by: Janne Koskinen
Diffstat (limited to 'examples')
-rw-r--r--examples/script/context2d/main.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/examples/script/context2d/main.cpp b/examples/script/context2d/main.cpp
index 2f195c9..2c3c623 100644
--- a/examples/script/context2d/main.cpp
+++ b/examples/script/context2d/main.cpp
@@ -46,8 +46,19 @@ int main(int argc, char **argv)
{
Q_INIT_RESOURCE(context2d);
+ bool smallScreen = false;
+ for (int i = 0; i < argc; i++)
+ if (QString(argv[i]) == "-small-screen")
+ smallScreen = true;
+
QApplication app(argc, argv);
Window win;
- win.show();
+
+ if (!smallScreen) {
+ win.show();
+ } else {
+ win.showFullScreen();
+ }
+
return app.exec();
}