From e83be4d5531ebaf416f7fa7d4e35910077dc8111 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sun, 27 Sep 2020 22:36:08 +0200 Subject: [PATCH] Fixed/tweaked export output layout --- src/GUI/gui.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/GUI/gui.cpp b/src/GUI/gui.cpp index 8274c682..4b7ab871 100644 --- a/src/GUI/gui.cpp +++ b/src/GUI/gui.cpp @@ -1161,6 +1161,7 @@ void GUI::plotMainPage(QPainter *painter, const QRectF &rect, qreal ratio, QLocale l(QLocale::system()); TrackInfo info; qreal ih, gh, mh; + int sc; if (!_pathName.isNull() && _options.printName) @@ -1209,11 +1210,15 @@ void GUI::plotMainPage(QPainter *painter, const QRectF &rect, qreal ratio, gh = (rect.width() > rect.height()) ? 0.15 * r * (rect.height() - ih - 2*mh) : 0.15 * (rect.height() - ih - 2*mh); + if (gh < 150) + gh = 150; + sc = 2; GraphTab *gt = static_cast(_graphTabWidget->currentWidget()); gt->plot(painter, QRectF(rect.x(), rect.y() + rect.height() - gh, rect.width(), gh), ratio); } else { gh = 0; + sc = 1; } MapView::PlotFlags flags = MapView::NoFlags; @@ -1223,7 +1228,7 @@ void GUI::plotMainPage(QPainter *painter, const QRectF &rect, qreal ratio, flags |= MapView::Expand; _mapView->plot(painter, QRectF(rect.x(), rect.y() + ih + mh, rect.width(), - rect.height() - (ih + 2*mh + gh)), ratio, flags); + rect.height() - (ih + sc*mh + gh)), ratio, flags); } void GUI::plotGraphsPage(QPainter *painter, const QRectF &rect, qreal ratio)