VirtualBox

Changeset 9437 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Jun 5, 2008 4:08:03 PM (17 years ago)
Author:
vboxsync
Message:

FE/Qt4-OSX: Icons in menus should go away again.

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

Legend:

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

    r9245 r9437  
    277277void darwinUpdateDockPreview (VBoxFrameBuffer *aFrameBuffer, CGImageRef aOverlayImage);
    278278
     279/* Icons in the menu of an mac application is unusual. */
     280void darwinDisableIconsInMenus();
     281
    279282/* Experimental region handler for the seamless mode */
    280283OSStatus darwinRegionHandler (EventHandlerCallRef aInHandlerCallRef, EventRef aInEvent, void *aInUserData);
  • trunk/src/VBox/Frontends/VirtualBox4/src/darwin/VBoxUtils-darwin.cpp

    r9259 r9437  
    3333#include <QPainter>
    3434#include <QApplication>
     35
     36#if QT_VERSION < 0x040400
     37extern void qt_mac_set_menubar_icons(bool b);
     38#endif /* QT_VERSION < 0x040400 */
    3539
    3640/**
     
    254258    CGImageRelease (ir);
    255259    CGColorSpaceRelease (cs);
     260}
     261
     262void darwinDisableIconsInMenus()
     263{
     264    /* No icons in the menu of a mac application. */
     265#if QT_VERSION < 0x040400
     266    qt_mac_set_menubar_icons (false);
     267#else /* QT_VERSION < 0x040400 */
     268    /* Available since Qt 4.4 only */
     269    a.setAttribute (Qt::AA_DontShowIconsInMenus, true);
     270#endif /* QT_VERSION >= 0x040400 */
    256271}
    257272
  • trunk/src/VBox/Frontends/VirtualBox4/src/main.cpp

    r9343 r9437  
    2727#ifdef Q_WS_MAC
    2828# include "QIApplication.h"
     29# include "VBoxUtils.h"
    2930#else
    3031# define QIApplication QApplication
     
    195196        a.setPalette (pal);
    196197#else /* !Q_WS_MAC */
    197         /* No icons in the menu of a mac application. */
    198         /* Available since Qt 4.4 only */
    199 //        a.setAttribute (Qt::AA_DontShowIconsInMenus, true);
     198        ::darwinDisableIconsInMenus();
    200199#endif /* Q_WS_MAC */
    201200
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