From 786110313920c3e42a348b8e92f0808b9a7a4529 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Mon, 14 Oct 2013 14:17:12 +0300 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/printlayout.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'qt-ui/printlayout.cpp') 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(); -- cgit v1.2.3-70-g09d2