Fix some minor rendering glitches (off by one errors)

This commit is contained in:
baldurk
2018-02-18 21:10:51 +00:00
parent 1792673864
commit 8691972212
2 changed files with 3 additions and 2 deletions
@@ -802,7 +802,6 @@ void RDHeaderView::paintEvent(QPaintEvent *e)
if(hasGroupTitle(i))
{
painter.save();
accumRect.setWidth(accumRect.width() - 1);
if(accumRect.left() < m_pinnedWidth && i >= m_pinnedColumns)
accumRect.setLeft(m_pinnedWidth);
+3 -1
View File
@@ -232,10 +232,12 @@ void RDTreeView::drawRow(QPainter *painter, const QStyleOptionViewItem &options,
back.greenF() * 0.8 + fore.greenF() * 0.2,
back.blueF() * 0.8 + fore.blueF() * 0.2)));
QRect intersectrect = options.rect.adjusted(0, 0, 1, 0);
for(int i = 0, count = model()->columnCount(); i < count; i++)
{
QRect r = visualRect(model()->index(index.row(), i, index.parent()));
r = r.intersected(options.rect);
r = r.intersected(intersectrect);
// draw bottom and right of the rect
if(r.width() > 0 && r.height() > 0)