mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
2d77788cb2
commit
76a8e83a54
5 changed files with 30 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue