VirtualBox

Changeset 70673 in vbox


Ignore:
Timestamp:
Jan 22, 2018 11:41:18 AM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
120409
Message:

FE/Qt: bugref:9072: HiDPI update for blended Filtered log-viewer background.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerTextEdit.cpp

    r70665 r70673  
    275275    if (m_bShownTextIsFiltered)
    276276    {
    277         QImage image(300, 100, QImage::Format_ARGB32_Premultiplied);
     277        /* For 100% scale PM_LargeIconSize is 32px, and since we want ~300x~100 pixmap we take it 9x3: */
     278        const int iIconMetric = QApplication::style()->pixelMetric(QStyle::PM_LargeIconSize);
     279        QImage image(9 * iIconMetric, 3 * iIconMetric, QImage::Format_ARGB32_Premultiplied);
    278280        QColor fillColor(QPalette::Light);
    279281        fillColor.setAlpha(0);
     
    281283        QPainter painter(&image);
    282284
    283         /* Configure the font size and color. */
     285        /* Configure the font size and color: */
    284286        QFont pfont = painter.font();
    285287        QColor fontColor(QPalette::Dark);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette