add rounded corners to flat button background

This commit is contained in:
laserpants 2016-05-15 21:41:19 +03:00
parent 32272b05eb
commit 2870ca75a3
1 changed files with 3 additions and 1 deletions

View File

@ -82,7 +82,9 @@ void FlatButton::paintEvent(QPaintEvent *event)
brush.setStyle(Qt::SolidPattern);
brush.setColor(d->delegate->backgroundColor());
painter.setOpacity(bgOpacity);
painter.fillRect(rect(), brush);
painter.setBrush(brush);
painter.setPen(Qt::NoPen);
painter.drawRoundedRect(rect(), 3, 3);
}
#ifdef DEBUG_LAYOUT