From 7833c355ee325887889df840a6486952b92f5f19 Mon Sep 17 00:00:00 2001 From: Stefan Wildemann Date: Mon, 3 Apr 2017 13:50:57 +0200 Subject: Fix: Make window as big as possible if w and h are not given --- navit/graphics/qt5/graphics_qt5.cpp | 7 +++++++ 1 file changed, 7 insertions(+) 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 #include #include +#include #if USE_QML #include #include @@ -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); -- cgit v1.2.1