Skip to content

Commit

Permalink
fix: Music icon is too small in quick panel on High scale ratio screen
Browse files Browse the repository at this point in the history
Icon size needs to be adapted to screen scale ratio.

Bug: https://pms.uniontech.com/bug-view-272035.html
Log: Music icon is too small in quick panel on High scale ratio screen
  • Loading branch information
ArchieMeng authored and deepin-bot[bot] committed Sep 4, 2024
1 parent 08128bd commit 5aa3b11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/dde-dock/media/quickpanelwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void QuickPanelWidget::updateUI()
MediaModel::MediaInfo info = MediaModel::ref().mediaInfo();
const bool pixmapExist = !info.pixmap.isNull();
if (!pixmapExist) {
info.pixmap = DHiDPIHelper::loadNxPixmap(":/deepin-music.svg").scaled(QSize(32, 32), Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
info.pixmap = DHiDPIHelper::loadNxPixmap(":/deepin-music.svg").scaled(QSize(32 * qApp->devicePixelRatio(), 32 * qApp->devicePixelRatio()), Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
}
const bool textInfoExist = !info.artist.isEmpty() || !info.title.isEmpty();
if (!textInfoExist) {
Expand Down Expand Up @@ -129,4 +129,4 @@ void QuickPanelWidget::mouseReleaseEvent(QMouseEvent *event)

QuickPanelWidget::~QuickPanelWidget()
{
}
}

0 comments on commit 5aa3b11

Please sign in to comment.