Changeset 24904 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Nov 24, 2009 2:15:19 PM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxSelectorWnd.h
r19239 r24904 46 46 class VBoxVMItem; 47 47 class VBoxTrayIcon; 48 class VBoxToolBar; 48 49 49 50 class QTabWidget; … … 146 147 QMenu *mVMMenu; 147 148 QMenu *mHelpMenu; 149 150 /* Main toolbar */ 151 VBoxToolBar *mVMToolBar; 148 152 149 153 /* VM list context menu */ -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp
r24784 r24904 477 477 478 478 /* VM list toolbar */ 479 VBoxToolBar *vmTools= new VBoxToolBar (this);479 mVMToolBar = new VBoxToolBar (this); 480 480 #if MAC_LEOPARD_STYLE 481 481 /* Enable unified toolbars on Mac OS X. Available on Qt >= 4.3 */ 482 addToolBar ( vmTools);483 vmTools->setMacToolbar();482 addToolBar (mVMToolBar); 483 mVMToolBar->setMacToolbar(); 484 484 /* No spacing/margin on the mac */ 485 485 VBoxGlobal::setLayoutMargin (centralLayout, 0); … … 535 535 /* add actions to the toolbar */ 536 536 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); 543 543 #if 0 /* delete action is really rare */ 544 vmTools->addAction (mVmDeleteAction);544 mVMToolBar->addAction (mVmDeleteAction); 545 545 #endif 546 vmTools->addAction (mVmStartAction);547 vmTools->addAction (mVmDiscardAction);546 mVMToolBar->addAction (mVmStartAction); 547 mVMToolBar->addAction (mVmDiscardAction); 548 548 549 549 /* add actions to menubar */ … … 721 721 int y = mNormalGeo.y(); 722 722 #if defined (Q_WS_MAC) && !defined (QT_MAC_USE_COCOA) 723 /* The toolbar counts to the content not to the frame. Unfortuna ly the724 * t oolbar isn't fully initialized when this window will be moved to725 * t he last position after VBox starting. As a workaround just do723 /* 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 726 726 * remove the toolbar height part when save the last position. */ 727 727 y -= ::darwinWindowToolBarHeight (this); … … 1475 1475 { 1476 1476 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 */ 1477 1483 mVmStartAction->setStatusTip ( 1478 1484 tr ("Start the selected virtual machine")); … … 1483 1489 { 1484 1490 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 */ 1485 1497 mVmStartAction->setStatusTip ( 1486 1498 tr ("Switch to the window of the selected virtual machine"));
Note:
See TracChangeset
for help on using the changeset viewer.