Skip to content
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.

Commit

Permalink
fix(listitem): do not draw the last line.
Browse files Browse the repository at this point in the history
Change-Id: I3d65740d2519c053056ddc530a162a427906a80a
  • Loading branch information
reionwong committed Jan 22, 2018
1 parent 0802701 commit 2d5ddfb
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions deepin-font-installer/listitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,16 @@ void ListItem::paintEvent(QPaintEvent *e)
{
Q_UNUSED(e);

if (m_item->listWidget()->count() >= 1 &&
m_item == m_item->listWidget()->item(m_item->listWidget()->count() - 1)) {
return;
}

QPainter painter(this);
painter.setRenderHint(QPainter::Antialiasing, true);

painter.setPen(Qt::NoPen);
painter.setBrush(QColor(151, 151, 151, 255 * 0.1));
painter.drawRect(QRect(60, rect().height() - 1, rect().width() - 70, 1));
painter.setPen(QColor(151, 151, 151, 255 * 0.1));
painter.drawLine(QPoint(60, rect().height() - 1),
QPoint(rect().width() - 5, rect().height() - 1));
}

void ListItem::enterEvent(QEvent *e)
Expand Down

0 comments on commit 2d5ddfb

Please sign in to comment.