diff options
author | Gehad elrobey <gehadelrobey@gmail.com> | 2015-06-22 22:46:39 +0200 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2015-07-05 20:58:29 +0300 |
commit | 5981cf170f9878cbe13da98667fd8817160335a6 (patch) | |
tree | 85be24bac36ae413242acfbfb95d954fb14a0e4d /printer.cpp | |
parent | 1faa198020de343004a7f1db85a83e6bc0ef8b34 (diff) | |
download | subsurface-5981cf170f9878cbe13da98667fd8817160335a6.tar.gz |
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>
Diffstat (limited to 'printer.cpp')
-rw-r--r-- | printer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; |