fix(button): use DPR for cached pixmap scale (#6255)
This commit is contained in:
+1
-1
@@ -53,7 +53,7 @@
|
|||||||
- Dev: Simplified string literals to be a re-export of Qt functions. (#6175)
|
- 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: Fixed incorrect lua generation of static methods for typescript plugins. (#6190, #6223)
|
||||||
- Dev: Merged top/bottom and left/right notebook layouts. (#6215)
|
- 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: `OnceFlag`'s internal flag is now atomic. (#6237)
|
||||||
- Dev: Bumped clang-format requirement to 19. (#6236)
|
- Dev: Bumped clang-format requirement to 19. (#6236)
|
||||||
|
|
||||||
|
|||||||
@@ -306,9 +306,11 @@ void Button::paintButton(QPainter &painter)
|
|||||||
|
|
||||||
if (this->cachePixmap_)
|
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->cachedPixmap_.setDevicePixelRatio(this->devicePixelRatio());
|
||||||
this->pixmapValid_ = false;
|
this->pixmapValid_ = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user