diff options
author | Lubomir I. Ivanov <neolit123@gmail.com> | 2013-11-30 15:17:34 +0200 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2013-11-30 15:32:14 +0200 |
commit | f85b434ef1fd58e559a68ab2f4e3fbc20e98dd46 (patch) | |
tree | 443340750a6bce34db26430967c7d81811228d07 /qt-ui/modeldelegates.cpp | |
parent | 3b7500fd33693da6c353600674166ca5098895e4 (diff) | |
download | subsurface-f85b434ef1fd58e559a68ab2f4e3fbc20e98dd46.tar.gz |
Print: update drawing of the profile table grid
The new table layout requires that we draw the vertical
and horizontal lines differently.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'qt-ui/modeldelegates.cpp')
-rw-r--r-- | qt-ui/modeldelegates.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/qt-ui/modeldelegates.cpp b/qt-ui/modeldelegates.cpp index 2b86476e1..7aa164723 100644 --- a/qt-ui/modeldelegates.cpp +++ b/qt-ui/modeldelegates.cpp @@ -329,15 +329,13 @@ void ProfilePrintDelegate::paint(QPainter *painter, const QStyleOptionViewItem & // grid color painter->setPen(QPen(QColor(0xff999999))); - // top line - if (row == 2 || row == 3 || row == 10 || col == 3 || col == 4) + // horizontal lines + if (row == 2 || row == 4 || row == 6) painter->drawLine(rect.topLeft(), rect.topRight()); - if (row > 1 && row < 10) { - // left line - draw always for these rows + if (row == 7) + painter->drawLine(rect.bottomLeft(), rect.bottomRight()); + // vertical lines + if (row > 1) painter->drawLine(rect.topLeft(), rect.bottomLeft()); - // "fix" for missing (?) right line after col 5 - if (col > 5 || (col > 4 && row == 2)) - painter->drawLine(rect.topRight(), rect.bottomRight()); - } QStyledItemDelegate::paint(painter, option, index); } |