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>
This commit is contained in:
Lubomir I. Ivanov 2013-10-14 14:17:12 +03:00 committed by Dirk Hohndel
parent 561d00d599
commit 7861103139

View file

@ -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();