Changeset 68392 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Aug 11, 2017 12:38:02 PM (7 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 2 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r68200 r68392 430 430 src/widgets/UIApplianceExportEditorWidget.h \ 431 431 src/widgets/UIApplianceImportEditorWidget.h \ 432 src/widgets/UIBar.h \433 432 src/widgets/UIBootTable.h \ 434 433 src/widgets/UIFilePathSelector.h \ … … 749 748 src/widgets/UIApplianceExportEditorWidget.cpp \ 750 749 src/widgets/UIApplianceImportEditorWidget.cpp \ 751 src/widgets/UIBar.cpp \752 750 src/widgets/UIBootTable.cpp \ 753 751 src/widgets/UIFilePathSelector.cpp \ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIImageTools.cpp
r63567 r68392 267 267 } 268 268 269 QPixmap betaLabelSleeve(const QSize &ls /* = QSize(80, 16) */)270 {271 const QImage &i = betaLabelImage(ls);272 /* Create a secondary image which will contain the rotated banner. */273 int w = (int)sqrtf(powf(ls.width(), 2) / 2);274 QImage i1(w, w, QImage::Format_ARGB32);275 i1.fill(Qt::transparent);276 QPainter p1(&i1);277 p1.setRenderHints(QPainter::SmoothPixmapTransform);278 p1.rotate(45);279 p1.drawImage(0, -ls.height(), i);280 p1.end();281 282 return QPixmap::fromImage(i1);283 }284 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIImageTools.h
r62493 r68392 29 29 30 30 QPixmap betaLabel(const QSize &ls = QSize(80, 16)); 31 QPixmap betaLabelSleeve(const QSize &ls = QSize(80, 16));32 31 33 32 #endif /* !__UIImageTools_h__ */ -
trunk/src/VBox/Frontends/VirtualBox/src/precomp.h
r67535 r68392 428 428 #include "UIApplianceExportEditorWidget.h" 429 429 #include "UIApplianceImportEditorWidget.h" 430 #include "UIBar.h"431 430 #include "UIBootTable.h" 432 431 #ifdef RT_OS_DARWIN -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r68315 r68392 23 23 # include <QApplication> 24 24 # include <QBitmap> 25 # include <QMenuBar> 25 26 # include <QWidget> 26 27 # ifdef VBOX_WS_MAC … … 49 50 # endif /* VBOX_WITH_VIDEOHWACCEL */ 50 51 # ifdef VBOX_WS_MAC 51 # include "UIMenuBar.h"52 52 # include "VBoxUtils-darwin.h" 53 53 # endif /* VBOX_WS_MAC */ … … 1044 1044 #ifdef VBOX_WS_MAC 1045 1045 /* Create Mac OS X menu-bar: */ 1046 m_pMenuBar = new UIMenuBar;1046 m_pMenuBar = new QMenuBar; 1047 1047 AssertPtrReturnVoid(m_pMenuBar); 1048 1048 { -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp
r68373 r68392 32 32 # include "QISplitter.h" 33 33 # include "UIActionPoolSelector.h" 34 # include "UIBar.h"35 34 # include "UIDesktopServices.h" 36 35 # include "UIExtraDataManager.h" … … 68 67 # include "UIDesktopWidgetWatchdog.h" 69 68 # endif 69 # ifndef VBOX_WS_MAC 70 # include "UIMenuBar.h" 71 # endif 70 72 71 73 /* Other VBox stuff: */ … … 115 117 , m_pSlidingWidget(0) 116 118 , m_pSplitter(0) 117 #ifndef VBOX_WS_MAC118 , m_pBar(0)119 #endif120 119 , m_pToolBar(0) 121 120 , m_pTabBarMachine(0) … … 192 191 /* Configure action: */ 193 192 pShowToolBar->setCheckable(true); 194 #ifdef VBOX_WS_MAC195 193 pShowToolBar->setChecked(m_pToolBar->isVisible()); 196 #else /* VBOX_WS_MAC */197 pShowToolBar->setChecked(m_pBar->isVisible());198 #endif /* !VBOX_WS_MAC */199 194 200 195 /* Add into action list: */ … … 235 230 { 236 231 if (pResult->isChecked()) 237 {238 #ifdef VBOX_WS_MAC239 232 m_pToolBar->show(); 240 #else /* VBOX_WS_MAC */241 m_pBar->show();242 #endif /* !VBOX_WS_MAC */243 }244 233 else 245 {246 #ifdef VBOX_WS_MAC247 234 m_pToolBar->hide(); 248 #else /* VBOX_WS_MAC */249 m_pBar->hide();250 #endif /* !VBOX_WS_MAC */251 }252 235 } 253 236 else if (pResult == pShowToolBarText) … … 1345 1328 if (vboxGlobal().isBeta()) 1346 1329 { 1347 QPixmap betaLabel = ::betaLabel Sleeve(QSize(107, 16));1348 ::darwinLabelWindow(this, &betaLabel, false);1330 QPixmap betaLabel = ::betaLabel(QSize(100, 16)); 1331 ::darwinLabelWindow(this, &betaLabel, true); 1349 1332 } 1350 1333 … … 1373 1356 void UISelectorWindow::prepareMenuBar() 1374 1357 { 1358 #ifndef VBOX_WS_MAC 1359 /* Create menu-bar: */ 1360 setMenuBar(new UIMenuBar); 1361 #endif 1362 1375 1363 /* Create action-pool: */ 1376 1364 m_pActionPool = UIActionPool::create(UIActionPoolType_Selector); … … 1793 1781 { 1794 1782 /* Configure toolbar: */ 1795 m_pToolBar->setSizePolicy(QSizePolicy::Minimum, QSizePolicy:: Minimum);1783 m_pToolBar->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); 1796 1784 m_pToolBar->setContextMenuPolicy(Qt::CustomContextMenu); 1797 1785 m_pToolBar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); … … 1858 1846 /* Add into toolbar: */ 1859 1847 m_pToolBar->addWidget(m_pToolbarTools); 1860 }1861 1862 /* Create/add horizontal spacer widget of fixed size for the beta label: */1863 QWidget *pSpace = new QWidget;1864 if (pSpace)1865 {1866 if (vboxGlobal().isBeta())1867 pSpace->setFixedSize(60, 1);1868 else1869 pSpace->setFixedSize(1, 1);1870 m_pToolBar->addWidget(pSpace);1871 1848 } 1872 1849 … … 1900 1877 1901 1878 #ifdef VBOX_WS_MAC 1902 1903 1879 /* Native toolbar on MAC: */ 1904 1880 addToolBar(m_pToolBar); 1905 1906 #else /* !VBOX_WS_MAC */ 1907 1908 /* Create main bar: */ 1909 m_pBar = new UIMainBar; 1910 AssertPtrReturnVoid(m_pBar); 1911 if (m_pBar) 1912 { 1913 /* Configure main bar: */ 1914 m_pBar->setContentWidget(m_pToolBar); 1915 1916 /* Add into layout: */ 1917 pLayout->addWidget(m_pBar); 1918 } 1919 1920 #endif /* !VBOX_WS_MAC */ 1881 #else 1882 /* Add into layout: */ 1883 pLayout->addWidget(m_pToolBar); 1884 #endif 1921 1885 1922 1886 /* Create sliding-widget: */ … … 2120 2084 if (!gEDataManager->selectorWindowToolBarVisible()) 2121 2085 QMetaObject::invokeMethod(m_pToolBar, "hide", Qt::QueuedConnection); 2122 #else /* VBOX_WS_MAC */2123 m_p Bar->setHidden(!gEDataManager->selectorWindowToolBarVisible());2124 #endif /* !VBOX_WS_MAC */2086 #else 2087 m_pToolBar->setHidden(!gEDataManager->selectorWindowToolBarVisible()); 2088 #endif 2125 2089 m_pToolBar->setToolButtonStyle(gEDataManager->selectorWindowToolBarTextVisible() 2126 2090 ? Qt::ToolButtonTextUnderIcon : Qt::ToolButtonIconOnly); … … 2160 2124 /* Save toolbar and statusbar visibility: */ 2161 2125 { 2162 #ifdef VBOX_WS_MAC2163 2126 gEDataManager->setSelectorWindowToolBarVisible(!m_pToolBar->isHidden()); 2164 #else /* VBOX_WS_MAC */2165 gEDataManager->setSelectorWindowToolBarVisible(!m_pBar->isHidden());2166 #endif /* !VBOX_WS_MAC */2167 2127 gEDataManager->setSelectorWindowToolBarTextVisible(m_pToolBar->toolButtonStyle() == Qt::ToolButtonTextUnderIcon); 2168 2128 gEDataManager->setSelectorWindowStatusBarVisible(!statusBar()->isHidden()); -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.h
r68315 r68392 36 36 class UIActionPool; 37 37 class UIGChooser; 38 #ifndef VBOX_WS_MAC39 class UIMainBar;40 #endif41 38 class UISlidingWidget; 42 39 class UITabBar; … … 337 334 QISplitter *m_pSplitter; 338 335 339 #ifndef VBOX_WS_MAC340 /** Holds the main bar instance. */341 UIMainBar *m_pBar;342 #endif343 336 /** Holds the main toolbar instance. */ 344 337 UIToolBar *m_pToolBar;
Note:
See TracChangeset
for help on using the changeset viewer.