summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Wildemann <metalstrolch@metalstrolche.de>2015-12-11 11:01:54 +0100
committerStefan Wildemann <gta04@metalstrolche.de>2017-02-23 19:40:26 +0100
commitd3013316bc6efbac5b6ba51efbc8bd556820814b (patch)
tree12e39b8f8022aefb4761c4612c101ec9fd695bb5
parentebaffdaaf0fe2b6b239fd458945f907a853245e0 (diff)
downloadnavit-d3013316bc6efbac5b6ba51efbc8bd556820814b.tar.gz
Qt5: Use default svg size if size not given
-rw-r--r--navit/graphics/qt5/graphics_qt5.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/navit/graphics/qt5/graphics_qt5.cpp b/navit/graphics/qt5/graphics_qt5.cpp
index a2e9ca127..9d24bbf7d 100644
--- a/navit/graphics/qt5/graphics_qt5.cpp
+++ b/navit/graphics/qt5/graphics_qt5.cpp
@@ -258,9 +258,9 @@ image_new(struct graphics_priv *gr, struct graphics_image_methods *meth, char *p
{
dbg(lvl_debug,"render %s\n", path);
/* try to render this */
- /* assume 16 pixel if size is not given */
- if(*w <= 0) *w = 16;
- if(*h <= 0) *h = 16;
+ /* assume "standard" size if size is not given */
+ if(*w <= 0) *w = renderer.defaultSize().width();
+ if(*h <= 0) *h = renderer.defaultSize().height();
image_priv->pixmap=new QPixmap(*w, *h);
image_priv->pixmap->fill(Qt::transparent);
QPainter painter(image_priv->pixmap);