VirtualBox

Changeset 55917 in vbox for trunk


Ignore:
Timestamp:
May 18, 2015 5:23:05 PM (10 years ago)
Author:
vboxsync
Message:

FE/Qt: 6278: Runtime UI: Status-bar: Enable use of the HiDPI icons.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIStatusBarIndicator.cpp

    r52730 r55917  
    2424# include <QPainter>
    2525# include <QHBoxLayout>
     26# include <QApplication>
     27# include <QStyle>
    2628# include <QLabel>
    2729# ifdef Q_WS_MAC
     
    9092{
    9193    /* Adjust size-hint: */
    92     m_size = m_size.expandedTo(icon.availableSizes().first());
     94    const QStyle *pStyle = QApplication::style();
     95    const int iIconMetric = pStyle->pixelMetric(QStyle::PM_SmallIconSize);
     96    m_size = QSize(iIconMetric, iIconMetric);
    9397    /* Cache passed-icon: */
    9498    m_icons[iState] = icon;
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIStatusBarEditorWindow.cpp

    r54529 r55917  
    125125    /* Prepare icon for assigned type: */
    126126    const QIcon icon = gpConverter->toIcon(m_type);
    127     m_pixmapSize = icon.availableSizes().first();
     127    const QStyle *pStyle = QApplication::style();
     128    const int iIconMetric = pStyle->pixelMetric(QStyle::PM_SmallIconSize);
     129    m_pixmapSize = QSize(iIconMetric, iIconMetric);
    128130    m_pixmap = icon.pixmap(m_pixmapSize);
    129131
Note: See TracChangeset for help on using the changeset viewer.

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