From 5981cf170f9878cbe13da98667fd8817160335a6 Mon Sep 17 00:00:00 2001 From: Gehad elrobey Date: Mon, 22 Jun 2015 22:46:39 +0200 Subject: Printing: make dive profile scale dependant on the page size and DPI Use setFontPrintScale() to change the font scale of the dive profile as a ratio of the full resolution, font = (pageWidth * dpi) / fontvalue Signed-off-by: Gehad elrobey Signed-off-by: Lubomir I. Ivanov --- printer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/printer.cpp b/printer.cpp index 44f0739bc..50027c23b 100644 --- a/printer.cpp +++ b/printer.cpp @@ -36,7 +36,7 @@ void Printer::render() // apply printing settings to profile profile->setFrameStyle(QFrame::NoFrame); profile->setPrintMode(true, !printOptions->color_selected); - profile->setFontPrintScale(0.6); + profile->setFontPrintScale(printer->pageLayout().paintRect(QPageLayout::Inch).width() * dpi * 0.001); profile->setToolTipVisibile(false); prefs.animation_speed = 0; -- cgit v1.2.3-70-g09d2