VirtualBox

Changeset 9261 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 30, 2008 4:17:33 PM (17 years ago)
Author:
vboxsync
Message:

FE/Qt4-OSX: Add an extra standardIcon method to VBoxGlobal, cause on the mac
the warning icon is equal to the application icon and we will change this to
something different.

Location:
trunk/src/VBox/Frontends/VirtualBox4
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxGlobal.h

    r9107 r9261  
    3434#include <QPixmap>
    3535#include <QMenu>
     36#include <QStyle>
    3637
    3738class QAction;
     
    521522                            const char *aActive = NULL,
    522523                            const char *aSmallActive = NULL);
     524
     525    static QIcon standardIcon (QStyle::StandardPixmap aStandard);
    523526
    524527    static void setTextLabel (QToolButton *aToolButton, const QString &aTextLabel);
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxDiskImageManagerDlg.cpp

    r9257 r9261  
    219219    mType = VBoxDefs::InvalidType;
    220220
    221     mIconInaccessible = style()->standardIcon (QStyle::SP_MessageBoxWarning);
    222     mIconErroneous = style()->standardIcon (QStyle::SP_MessageBoxCritical);
     221    mIconInaccessible = vboxGlobal().standardIcon (QStyle::SP_MessageBoxWarning);
     222    mIconErroneous = vboxGlobal().standardIcon (QStyle::SP_MessageBoxCritical);
    223223    mIconHD = VBoxGlobal::iconSet (":/hd_16px.png", ":/hd_disabled_16px.png");
    224224    mIconCD = VBoxGlobal::iconSet (":/cd_16px.png", ":/cd_disabled_16px.png");
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxGlobal.cpp

    r9107 r9261  
    27492749}
    27502750
     2751QIcon VBoxGlobal::standardIcon (QStyle::StandardPixmap aStandard)
     2752{
     2753#ifdef Q_WS_MAC
     2754    /* At least in Qt 4.3.4/4.4 RC1 SP_MessageBoxWarning is the application
     2755     * icon. So change this to the critical icon. (Maybe this would be
     2756     * fixed in a later Qt version) */
     2757    if (aStandard == QStyle::SP_MessageBoxWarning)
     2758        return QApplication::style()->standardIcon (QStyle::SP_MessageBoxCritical);
     2759#endif /* Q_WS_MAC */
     2760    return QApplication::style()->standardIcon (aStandard);
     2761}
     2762
    27512763/**
    27522764 *  Replacement for QToolButton::setTextLabel() that handles the shortcut
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