VirtualBox

Ignore:
Timestamp:
Nov 24, 2009 2:15:19 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt4-OSX: fix displaying a "more arrow" after starting a VM

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxSelectorWnd.h

    r19239 r24904  
    4646class VBoxVMItem;
    4747class VBoxTrayIcon;
     48class VBoxToolBar;
    4849
    4950class QTabWidget;
     
    146147    QMenu *mVMMenu;
    147148    QMenu *mHelpMenu;
     149
     150    /* Main toolbar */
     151    VBoxToolBar *mVMToolBar;
    148152
    149153    /* VM list context menu */
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp

    r24784 r24904  
    477477
    478478    /* VM list toolbar */
    479     VBoxToolBar *vmTools = new VBoxToolBar (this);
     479    mVMToolBar = new VBoxToolBar (this);
    480480#if MAC_LEOPARD_STYLE
    481481    /* Enable unified toolbars on Mac OS X. Available on Qt >= 4.3 */
    482     addToolBar (vmTools);
    483     vmTools->setMacToolbar();
     482    addToolBar (mVMToolBar);
     483    mVMToolBar->setMacToolbar();
    484484    /* No spacing/margin on the mac */
    485485    VBoxGlobal::setLayoutMargin (centralLayout, 0);
     
    535535    /* add actions to the toolbar */
    536536
    537     vmTools->setIconSize (QSize (32, 32));
    538     vmTools->setToolButtonStyle (Qt::ToolButtonTextUnderIcon);
    539     vmTools->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Preferred);
    540 
    541     vmTools->addAction (mVmNewAction);
    542     vmTools->addAction (mVmConfigAction);
     537    mVMToolBar->setIconSize (QSize (32, 32));
     538    mVMToolBar->setToolButtonStyle (Qt::ToolButtonTextUnderIcon);
     539    mVMToolBar->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Preferred);
     540
     541    mVMToolBar->addAction (mVmNewAction);
     542    mVMToolBar->addAction (mVmConfigAction);
    543543#if 0 /* delete action is really rare */
    544     vmTools->addAction (mVmDeleteAction);
     544    mVMToolBar->addAction (mVmDeleteAction);
    545545#endif
    546     vmTools->addAction (mVmStartAction);
    547     vmTools->addAction (mVmDiscardAction);
     546    mVMToolBar->addAction (mVmStartAction);
     547    mVMToolBar->addAction (mVmDiscardAction);
    548548
    549549    /* add actions to menubar */
     
    721721        int y = mNormalGeo.y();
    722722#if defined (Q_WS_MAC) && !defined (QT_MAC_USE_COCOA)
    723         /* The toolbar counts to the content not to the frame. Unfortunaly the
    724          * toolbar isn't fully initialized when this window will be moved to
    725          * the last position after VBox starting. As a workaround just do
     723        /* The toolbar counts to the content not to the frame. Unfortunately
     724         * the toolbar isn't fully initialized when this window will be moved
     725         * to the last position after VBox starting. As a workaround just do
    726726         * remove the toolbar height part when save the last position. */
    727727        y -= ::darwinWindowToolBarHeight (this);
     
    14751475        {
    14761476            mVmStartAction->setText (tr ("S&tart"));
     1477#ifdef QT_MAC_USE_COCOA
     1478            /* There is a bug in Qt Cocoa which result in showing a "more
     1479             * arrow" when the necessary size of the toolbar is increased. So
     1480             * manually adjust the size after changing the text. */
     1481            mVMToolBar->adjustSize();
     1482#endif /* QT_MAC_USE_COCOA */
    14771483            mVmStartAction->setStatusTip (
    14781484                tr ("Start the selected virtual machine"));
     
    14831489        {
    14841490            mVmStartAction->setText (tr ("S&how"));
     1491#ifdef QT_MAC_USE_COCOA
     1492            /* There is a bug in Qt Cocoa which result in showing a "more
     1493             * arrow" when the necessary size of the toolbar is increased. So
     1494             * manually adjust the size after changing the text. */
     1495            mVMToolBar->adjustSize();
     1496#endif /* QT_MAC_USE_COCOA */
    14851497            mVmStartAction->setStatusTip (
    14861498                tr ("Switch to the window of the selected virtual machine"));
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