Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Commit

Permalink
Fixed icons rendering.
Browse files Browse the repository at this point in the history
  • Loading branch information
RazrFalcon committed Dec 16, 2017
1 parent c52ef55 commit 0950d17
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/treemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ void StatusDelegate::paint(QPainter *p, const QStyleOptionViewItem &opt,
initStyleOption(&opt2, index);
opt2.text = QString();

const auto iconL = opt.fontMetrics.height();
auto iconL = opt.fontMetrics.height();
iconL -= iconL % 2;
const auto offset = (opt.rect.height() - iconL) / 2;
const auto iconRect = QRect(opt.rect.x() + offset, opt.rect.y() + offset, iconL, iconL);

Expand Down

0 comments on commit 0950d17

Please sign in to comment.