Changeset 59094 in vbox for trunk/src/VBox
- Timestamp:
- Dec 11, 2015 3:10:25 PM (9 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIListView.cpp
r52733 r59094 21 21 22 22 /* Qt includes: */ 23 # if MAC_LEOPARD_STYLE 23 # ifdef Q_WS_MAC 24 # include <QApplication> 24 25 # include <QPainter> 25 # include <QApplication> 26 # endif /* MAC_LEOPARD_STYLE */ 26 # endif /* Q_WS_MAC */ 27 27 28 28 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */ 29 29 30 #if MAC_LEOPARD_STYLE 30 /* Qt includes: */ 31 #ifdef Q_WS_MAC 31 32 # include <qmacstyle_mac.h> 32 #endif /* MAC_LEOPARD_STYLE*/33 #endif /* Q_WS_MAC */ 33 34 34 35 /* GUI includes: */ … … 39 40 :QListView (aParent) 40 41 { 42 #ifdef Q_WS_MAC 41 43 /* Track if the application lost the focus */ 42 #if MAC_LEOPARD_STYLE43 44 connect (QCoreApplication::instance(), SIGNAL (focusChanged (QWidget *, QWidget *)), 44 45 this, SLOT (focusChanged (QWidget *, QWidget *))); … … 51 52 * may change at any time! */ 52 53 static_cast<QMacStyle *> (style())->setFocusRectPolicy (this, QMacStyle::FocusDisabled); 53 #endif /* MAC_LEOPARD_STYLE*/54 #endif /* Q_WS_MAC */ 54 55 } 55 56 56 57 void QIListView::focusChanged (QWidget * /* aOld */, QWidget *aNow) 57 58 { 58 #if MAC_LEOPARD_STYLE59 #ifdef Q_WS_MAC 59 60 QColor bgColor (212, 221, 229); 60 61 if (aNow == NULL) … … 64 65 viewport()->setPalette (pal); 65 66 viewport()->setAutoFillBackground(true); 66 #else /* MAC_LEOPARD_STYLE*/67 #else /* !Q_WS_MAC */ 67 68 Q_UNUSED (aNow); 68 #endif /* MAC_LEOPARD_STYLE*/69 #endif /* !Q_WS_MAC */ 69 70 } 70 71 … … 74 75 const QModelIndex &aIndex) const 75 76 { 76 #if MAC_LEOPARD_STYLE77 NOREF(aIndex);77 #ifdef Q_WS_MAC 78 Q_UNUSED (aIndex); 78 79 /* Macify for Leopard */ 79 80 if (aOption.state & QStyle::State_Selected) … … 116 117 aPainter->fillRect(aOption.rect, bgColor); 117 118 } 118 #else /* MAC_LEOPARD_STYLE*/119 #else /* !Q_WS_MAC */ 119 120 QItemDelegate::drawBackground (aPainter, aOption, aIndex); 120 #endif /* MAC_LEOPARD_STYLE*/121 #endif /* !Q_WS_MAC */ 121 122 } 122 123 -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
r58866 r59094 1310 1310 m_pMainLayout == centralWidget()->layout()); 1311 1311 { 1312 #if MAC_LEOPARD_STYLE1312 #ifdef Q_WS_MAC 1313 1313 /* No spacing/margins on the Mac: */ 1314 1314 m_pMainLayout->setContentsMargins(0, 0, 0, 0); 1315 1315 m_pMainLayout->insertSpacing(0, 10); 1316 #else /* ! MAC_LEOPARD_STYLE*/1316 #else /* !Q_WS_MAC */ 1317 1317 /* Set spacing/margin like in the selector window: */ 1318 1318 m_pMainLayout->setSpacing(5); 1319 1319 m_pMainLayout->setContentsMargins(5, 5, 5, 5); 1320 #endif /* ! MAC_LEOPARD_STYLE*/1320 #endif /* !Q_WS_MAC */ 1321 1321 /* Prepare tool-bar: */ 1322 1322 prepareToolBar(); … … 1348 1348 m_pToolBar->addAction(m_pActionSave); 1349 1349 /* Integrate tool-bar into dialog: */ 1350 #if MAC_LEOPARD_STYLE1350 #ifdef Q_WS_MAC 1351 1351 /* Enable unified tool-bars on Mac OS X. Available on Qt >= 4.3: */ 1352 1352 addToolBar(m_pToolBar); 1353 1353 m_pToolBar->enableMacToolbar(); 1354 #else /* ! MAC_LEOPARD_STYLE*/1354 #else /* !Q_WS_MAC */ 1355 1355 /* Add tool-bar into main-layout: */ 1356 1356 m_pMainLayout->addWidget(m_pToolBar); 1357 #endif /* ! MAC_LEOPARD_STYLE*/1357 #endif /* !Q_WS_MAC */ 1358 1358 } 1359 1359 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.h
r57953 r59094 36 36 37 37 /* Defines: */ 38 #define MAC_LEOPARD_STYLE defined(Q_WS_MAC) && (QT_VERSION >= 0x040300)39 40 38 #ifdef DEBUG 41 39 # define AssertWrapperOk(w) \ -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp
r59092 r59094 1154 1154 /* Integrate tool-bar into dialog: */ 1155 1155 QVBoxLayout *pMainLayout = qobject_cast<QVBoxLayout*>(centralWidget()->layout()); 1156 #if MAC_LEOPARD_STYLE1156 #ifdef Q_WS_MAC 1157 1157 /* Enable unified tool-bars on Mac OS X. Available on Qt >= 4.3: */ 1158 1158 addToolBar(m_pToolBar); … … 1161 1161 pMainLayout->setContentsMargins(0, 0, 0, 0); 1162 1162 pMainLayout->insertSpacing(0, 10); 1163 #else /* MAC_LEOPARD_STYLE*/1163 #else /* !Q_WS_MAC */ 1164 1164 /* Add the tool-bar: */ 1165 1165 pMainLayout->insertWidget(0, m_pToolBar); … … 1167 1167 pMainLayout->setSpacing(5); 1168 1168 pMainLayout->setContentsMargins(5, 5, 5, 5); 1169 #endif /* ! MAC_LEOPARD_STYLE*/1169 #endif /* !Q_WS_MAC */ 1170 1170 } 1171 1171 } -
trunk/src/VBox/Frontends/VirtualBox/src/precomp.h
r58948 r59094 673 673 #endif 674 674 675 676 /*677 * Final tweaks.678 */679 #ifdef Q_WS_MAC680 # if MAC_LEOPARD_STYLE /* This is defined by UIDefs.h and must come after it was included */681 //# include <qmacstyle_mac.h> - only used once682 # endif683 #endif684 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp
r59092 r59094 1157 1157 1158 1158 #ifdef Q_WS_MAC 1159 # if MAC_LEOPARD_STYLE 1160 /* Enable unified toolbars on Mac OS X: */ 1159 /* Enable unified toolbar: */ 1161 1160 m_pToolBar->enableMacToolbar(); 1162 # endif /* MAC_LEOPARD_STYLE */1163 1161 1164 1162 /* Beta label? */ … … 1509 1507 1510 1508 /* Layout all the widgets: */ 1511 #if MAC_LEOPARD_STYLE1509 #ifdef Q_WS_MAC 1512 1510 addToolBar(m_pToolBar); 1513 1511 /* Central widget @ horizontal layout: */ 1514 1512 setCentralWidget(m_pSplitter); 1515 1513 m_pSplitter->addWidget(m_pPaneChooser); 1516 #else /* MAC_LEOPARD_STYLE*/1514 #else /* !Q_WS_MAC */ 1517 1515 QWidget *pCentralWidget = new QWidget(this); 1518 1516 setCentralWidget(pCentralWidget); … … 1525 1523 pCentralLayout->addWidget(m_pSplitter); 1526 1524 m_pSplitter->addWidget(m_pPaneChooser); 1527 #endif /* ! MAC_LEOPARD_STYLE*/1525 #endif /* !Q_WS_MAC */ 1528 1526 m_pSplitter->addWidget(m_pContainerDetails); 1529 1527 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.cpp
r55742 r59094 43 43 # ifdef Q_WS_MAC 44 44 # include "VBoxUtils.h" 45 # endif 45 # endif /* Q_WS_MAC */ 46 46 47 47 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */ 48 48 49 49 #ifdef Q_WS_MAC 50 # if MAC_LEOPARD_STYLE 51 # define VBOX_GUI_WITH_TOOLBAR_SETTINGS 52 # endif 53 #endif 50 # define VBOX_GUI_WITH_TOOLBAR_SETTINGS 51 #endif /* Q_WS_MAC */ 54 52 55 53 /* Settings Dialog Constructor: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp
r55742 r59094 62 62 63 63 #ifdef Q_WS_MAC 64 # if MAC_LEOPARD_STYLE 65 # define VBOX_GUI_WITH_TOOLBAR_SETTINGS 66 # endif 67 #endif 64 # define VBOX_GUI_WITH_TOOLBAR_SETTINGS 65 #endif /* Q_WS_MAC */ 68 66 69 67 UISettingsDialogGlobal::UISettingsDialogGlobal(QWidget *pParent,
Note:
See TracChangeset
for help on using the changeset viewer.