Skip to content

Commit

Permalink
qt6 scale issue fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sulincix committed Aug 15, 2024
1 parent efe20c1 commit d640243
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Button.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ QPushButton* create_button(const char* name, ButtonEvent event) {

void set_icon(const char* name, QPushButton * button) {
QIcon icon = QIcon(name);
QPixmap pixmap = icon.pixmap(icon.actualSize(QSize(screenHeight/23, screenHeight/23)));
QPixmap pixmap = icon.pixmap(QSize(screenHeight/23, screenHeight/23));
button->setIcon(icon);
button->setIconSize(pixmap.rect().size());
button->setIconSize(QSize(screenHeight/23, screenHeight/23));
button->setFlat(true);
}

0 comments on commit d640243

Please sign in to comment.