Changeset 52059 in vbox
- Timestamp:
- Jul 16, 2014 6:24:26 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
r52058 r52059 299 299 void sltHandleDragObjectDestroy(); 300 300 301 #ifdef RT_OS_DARWIN302 301 /** Performs window activation. */ 303 302 void sltActivateWindow() { activateWindow(); } 304 #endif /* RT_OS_DARWIN */305 303 306 304 private: … … 469 467 /* Delete window when closed: */ 470 468 setAttribute(Qt::WA_DeleteOnClose); 469 #if defined(Q_WS_MAC) || defined(Q_WS_WIN) 471 470 /* Make sure we have no background 472 471 * until the first one paint-event: */ 473 472 setAttribute(Qt::WA_NoSystemBackground); 473 #endif /* Q_WS_MAC || Q_WS_WIN */ 474 474 #if defined(Q_WS_MAC) 475 475 /* Using native API to enable translucent background for the Mac host. … … 494 494 { 495 495 /* Configure main-layout: */ 496 #if defined(Q_WS_WIN) 497 /* Standard margins on Windows: */ 496 #ifdef Q_WS_MAC 497 /* Standard margins on Mac OS X are too big: */ 498 m_pMainLayout->setContentsMargins(10, 10, 10, 5); 499 #else /* !Q_WS_MAC */ 500 /* Standard margins on Windows/X11: */ 498 501 int iLeft, iTop, iRight, iBottom; 499 502 m_pMainLayout->getContentsMargins(&iLeft, &iTop, &iRight, &iBottom); … … 501 504 iBottom -= 5; 502 505 m_pMainLayout->setContentsMargins(iLeft, iTop, iRight, iBottom); 503 #elif defined(Q_WS_MAC) 504 /* Standard margins on Mac OS X are too big: */ 505 m_pMainLayout->setContentsMargins(10, 10, 10, 5); 506 #endif /* Q_WS_MAC */ 506 #endif /* !Q_WS_MAC */ 507 507 m_pMainLayout->setSpacing(0); 508 508 /* Create close-button: */ … … 599 599 { 600 600 /* Prepare geometry based on minimum size-hint: */ 601 connect(this, SIGNAL(sigShown()), this, SLOT(sltActivateWindow()), Qt::QueuedConnection); 601 602 const QSize msh = minimumSizeHint(); 602 603 setGeometry(m_rect.x(), m_rect.y() + m_rect.height() - m_statusBarRect.height() - msh.height(), … … 709 710 color1.setAlpha(0); 710 711 QColor color2 = pal.color(QPalette::Window).darker(200); 711 #if def Q_WS_WIN712 #if defined(Q_WS_WIN) || defined(Q_WS_X11) 712 713 QColor color3 = pal.color(QPalette::Window).darker(120); 713 #endif /* Q_WS_WIN */714 #endif /* Q_WS_WIN || Q_WS_X11 */ 714 715 715 716 /* Left corner: */ … … 751 752 painter.fillRect(QRect(0, 5, 5, height() - 5), grad4); 752 753 painter.fillRect(QRect(width() - 5, 5, 5, height() - 5), grad5); 753 #if def Q_WS_WIN754 #if defined(Q_WS_WIN) || defined(Q_WS_X11) 754 755 painter.save(); 755 756 painter.setPen(color3); … … 759 760 painter.drawLine(QLine(QPoint(5 + 1, height() - 1), QPoint(5 + 1, 5 + 1))); 760 761 painter.restore(); 761 #endif /* Q_WS_WIN */762 #endif /* Q_WS_WIN || Q_WS_X11 */ 762 763 763 764 /* Paint drop token: */ … … 1075 1076 AssertPtrReturnVoid(statusBar()); 1076 1077 { 1077 #if defined(Q_WS_WIN) || defined (Q_WS_MAC)1078 1078 /* Configure status-bar: */ 1079 1079 statusBar()->setContextMenuPolicy(Qt::CustomContextMenu); 1080 1080 connect(statusBar(), SIGNAL(customContextMenuRequested(const QPoint&)), 1081 1081 this, SLOT(sltShowStatusBarContextMenu(const QPoint&))); 1082 #endif /* Q_WS_WIN || Q_WS_MAC */1083 1082 /* Create indicator-pool: */ 1084 1083 m_pIndicatorsPool = new UIIndicatorsPool(machineLogic()->uisession());
Note:
See TracChangeset
for help on using the changeset viewer.