[PATCH 5/7] PrintLayout: variate the profile size based on the #dives per page
Lubomir I. Ivanov
neolit123 at gmail.com
Thu Jul 24 17:50:43 PDT 2014
From: "Lubomir I. Ivanov" <neolit123 at gmail.com>
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 at gmail.com>
---
qt-ui/printlayout.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qt-ui/printlayout.cpp b/qt-ui/printlayout.cpp
index 5a7dd3a..318ba4e 100644
--- a/qt-ui/printlayout.cpp
+++ b/qt-ui/printlayout.cpp
@@ -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) {
--
1.7.11.msysgit.0
More information about the subsurface
mailing list