fix(button): use DPR for cached pixmap scale (#6255)

This commit is contained in:
nerix
2025-06-07 13:31:58 +02:00
committed by GitHub
parent c2e0fd8efe
commit 6b627b1c5b
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -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;
}