diff options
author | Stefan Wildemann <gta04@metalstrolche.de> | 2017-04-03 13:50:57 +0200 |
---|---|---|
committer | Stefan Wildemann <gta04@metalstrolche.de> | 2017-04-03 13:50:57 +0200 |
commit | 7833c355ee325887889df840a6486952b92f5f19 (patch) | |
tree | 1a0ef520ad7fa363a64c9d42fcba68a44f185acf | |
parent | 9d9f2f9cbd7982657d37ce3e747d2f43372b2af2 (diff) | |
download | navit-7833c355ee325887889df840a6486952b92f5f19.tar.gz |
Fix: Make window as big as possible if w and h are not given
-rw-r--r-- | navit/graphics/qt5/graphics_qt5.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/navit/graphics/qt5/graphics_qt5.cpp b/navit/graphics/qt5/graphics_qt5.cpp index 900374394..c7408690d 100644 --- a/navit/graphics/qt5/graphics_qt5.cpp +++ b/navit/graphics/qt5/graphics_qt5.cpp @@ -44,6 +44,7 @@ #include <QDBusConnection> #include <QDBusInterface> #include <QFile> +#include <QScreen> #if USE_QML #include <QQuickWindow> #include <QQmlApplicationEngine> @@ -940,6 +941,12 @@ graphics_qt5_new(struct navit *nav, struct graphics_methods *meth, struct attr * QRect geomet; geomet.setHeight(100); geomet.setWidth(100); + /* get desktop size */ + QScreen *primary = navit_app->primaryScreen(); + if(primary != NULL) + { + geomet = primary->availableGeometry(); + } /* check for height */ if ((h = attr_search(attrs, NULL, attr_h)) && (h->u.num > 100)) geomet.setHeight(h->u.num); |