PrintLayout: modify the profile font size based on the #dives per page

For the profile print, the number of dives per page is:
divesPerRow * divesPerColumn

If we have more 3, 0.6 seems optimal, while for less we can
pretty much use the default scale of 1.0.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Lubomir I. Ivanov 2014-07-25 03:50:43 +03:00 committed by Dirk Hohndel
parent e3dbbfe9f2
commit c51d4ce0b0

View file

@ -145,7 +145,7 @@ void PrintLayout::printProfileDives(int divesPerRow, int divesPerColumn)
const int profileFrameStyle = profile->frameStyle();
profile->setFrameStyle(QFrame::NoFrame);
profile->setPrintMode(true, !printOptions->color_selected);
profile->setFontPrintScale(0.4); // does a single scale work for all layouts???
profile->setFontPrintScale(divesPerRow * divesPerColumn > 3 ? 0.6 : 1.0);
QSize originalSize = profile->size();
// swap rows/col for landscape
if (printer->orientation() == QPrinter::Landscape) {