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 <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
Gehad elrobey 2015-06-22 22:46:39 +02:00 committed by Lubomir I. Ivanov
parent 1faa198020
commit 5981cf170f

View file

@ -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;