diff --git a/CHANGELOG.md b/CHANGELOG.md index 5eb1fbee..dfaefbd6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,7 +53,7 @@ - Dev: Simplified string literals to be a re-export of Qt functions. (#6175) - Dev: Fixed incorrect lua generation of static methods for typescript plugins. (#6190, #6223) - Dev: Merged top/bottom and left/right notebook layouts. (#6215) -- Dev: Refactored `Button` and friends. (#6102) +- Dev: Refactored `Button` and friends. (#6102, #6255) - Dev: `OnceFlag`'s internal flag is now atomic. (#6237) - Dev: Bumped clang-format requirement to 19. (#6236) diff --git a/src/widgets/buttons/Button.cpp b/src/widgets/buttons/Button.cpp index cc972e1b..dc4c87cf 100644 --- a/src/widgets/buttons/Button.cpp +++ b/src/widgets/buttons/Button.cpp @@ -306,9 +306,11 @@ void Button::paintButton(QPainter &painter) if (this->cachePixmap_) { - if (this->cachedPixmap_.size() != this->size()) + if (this->cachedPixmap_.size() / this->devicePixelRatio() != + this->size()) { - this->cachedPixmap_ = QPixmap(this->size()); + this->cachedPixmap_ = + QPixmap(this->size() * this->devicePixelRatio()); this->cachedPixmap_.setDevicePixelRatio(this->devicePixelRatio()); this->pixmapValid_ = false; }