summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2013-10-14 14:17:12 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-10-14 13:15:58 -0700
commit786110313920c3e42a348b8e92f0808b9a7a4529 (patch)
treee16072ac19aeb1b34c08a85d6e92bf94c82b67cf
parent561d00d599f92dbd11161ef14e9581191922b8f4 (diff)
downloadsubsurface-786110313920c3e42a348b8e92f0808b9a7a4529.tar.gz
Print: remove profile border when printing
Custom widget frame styles such as 'Sunken' and 'Raised' which seem to varry between OS will be captured as well: http://harmattan-dev.nokia.com/docs/library/html/qt4/qframe.html#Shape-enum So instead we temporarily set the profile frame to QFrame::NoFrame and then restore it to the previous value. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/printlayout.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/qt-ui/printlayout.cpp b/qt-ui/printlayout.cpp
index 3ddc02aa3..d0f3f16da 100644
--- a/qt-ui/printlayout.cpp
+++ b/qt-ui/printlayout.cpp
@@ -114,6 +114,8 @@ void PrintLayout::printProfileDives(int divesPerRow, int divesPerColumn)
// setup the profile widget
ProfileGraphicsView *profile = mainWindow()->graphics();
+ const int profileFrameStyle = profile->frameStyle();
+ profile->setFrameStyle(QFrame::NoFrame);
profile->clear();
profile->setPrintMode(true, !printOptions->color_selected);
QSize originalSize = profile->size();
@@ -178,6 +180,7 @@ void PrintLayout::printProfileDives(int divesPerRow, int divesPerColumn)
// cleanup
painter.end();
delete table;
+ profile->setFrameStyle(profileFrameStyle);
profile->setPrintMode(false);
profile->resize(originalSize);
profile->clear();