Skip to content

Commit

Permalink
Update boxeslistactionbutton.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
rodlie committed May 5, 2024
1 parent a1a0954 commit 228cebf
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/core/GUI/boxeslistactionbutton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,14 @@ void BoxesListActionButton::leaveEvent(QEvent *) {
update();
}

void PixmapActionButton::paintEvent(QPaintEvent *) {
if(!mPixmapChooser) return;
const auto pix = mPixmapChooser();
if(!pix) return;
void PixmapActionButton::paintEvent(QPaintEvent *)
{
if (!mPixmapChooser) { return; }
const auto iconSize = eSizesUI::widget.size();
const auto pix = mPixmapChooser()->scaled(iconSize, iconSize);
if (!pix) { return; }

QPainter p(this);
p.drawPixmap(0, 0, *pix);
p.drawPixmap(0, 0, pix);
p.end();
}

0 comments on commit 228cebf

Please sign in to comment.