summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/divetextitem.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-09 13:09:52 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-09 13:12:29 -0700
commit76a8e83a541febe9b94ec84d3fd8320c86999265 (patch)
treeaa64d0b6de2e28c73026653479cab60f0b6f3d10 /qt-ui/profile/divetextitem.cpp
parent2d77788cb2fe293b72cff7f51a200d90c928dcea (diff)
downloadsubsurface-76a8e83a541febe9b94ec84d3fd8320c86999265.tar.gz
Printing: scale fonts when printing
This seem to work better, but it misses a couple of items at times (for example the highest label on some of the axis). Needs lots more testing. See #590 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/divetextitem.cpp')
-rw-r--r--qt-ui/profile/divetextitem.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/qt-ui/profile/divetextitem.cpp b/qt-ui/profile/divetextitem.cpp
index 582cc4070..4d8687626 100644
--- a/qt-ui/profile/divetextitem.cpp
+++ b/qt-ui/profile/divetextitem.cpp
@@ -1,5 +1,6 @@
#include "divetextitem.h"
#include "animationfunctions.h"
+#include "mainwindow.h"
#include <QPropertyAnimation>
#include <QApplication>
@@ -61,11 +62,11 @@ void DiveTextItem::updateText()
QFont fnt(qApp->font());
if ((size = fnt.pixelSize()) > 0) {
// set in pixels - so the scale factor may not make a difference if it's too close to 1
- size *= scale;
+ size *= scale * MainWindow::instance()->graphics()->getFontPrintScale();
fnt.setPixelSize(size);
} else {
size = fnt.pointSizeF();
- size *= scale;
+ size *= scale * MainWindow::instance()->graphics()->getFontPrintScale();;
fnt.setPointSizeF(size);
}
QFontMetrics fm(fnt);