VirtualBox

Changeset 52059 in vbox


Ignore:
Timestamp:
Jul 16, 2014 6:24:26 PM (10 years ago)
Author:
vboxsync
Message:

FE/Qt: 3646: Status-bar Editor: X11 host support.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp

    r52058 r52059  
    299299    void sltHandleDragObjectDestroy();
    300300
    301 #ifdef RT_OS_DARWIN
    302301    /** Performs window activation. */
    303302    void sltActivateWindow() { activateWindow(); }
    304 #endif /* RT_OS_DARWIN */
    305303
    306304private:
     
    469467    /* Delete window when closed: */
    470468    setAttribute(Qt::WA_DeleteOnClose);
     469#if defined(Q_WS_MAC) || defined(Q_WS_WIN)
    471470    /* Make sure we have no background
    472471     * until the first one paint-event: */
    473472    setAttribute(Qt::WA_NoSystemBackground);
     473#endif /* Q_WS_MAC || Q_WS_WIN */
    474474#if defined(Q_WS_MAC)
    475475    /* Using native API to enable translucent background for the Mac host.
     
    494494    {
    495495        /* 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: */
    498501        int iLeft, iTop, iRight, iBottom;
    499502        m_pMainLayout->getContentsMargins(&iLeft, &iTop, &iRight, &iBottom);
     
    501504            iBottom -= 5;
    502505        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 */
    507507        m_pMainLayout->setSpacing(0);
    508508        /* Create close-button: */
     
    599599{
    600600    /* Prepare geometry based on minimum size-hint: */
     601    connect(this, SIGNAL(sigShown()), this, SLOT(sltActivateWindow()), Qt::QueuedConnection);
    601602    const QSize msh = minimumSizeHint();
    602603    setGeometry(m_rect.x(), m_rect.y() + m_rect.height() - m_statusBarRect.height() - msh.height(),
     
    709710    color1.setAlpha(0);
    710711    QColor color2 = pal.color(QPalette::Window).darker(200);
    711 #ifdef Q_WS_WIN
     712#if defined(Q_WS_WIN) || defined(Q_WS_X11)
    712713    QColor color3 = pal.color(QPalette::Window).darker(120);
    713 #endif /* Q_WS_WIN */
     714#endif /* Q_WS_WIN || Q_WS_X11 */
    714715
    715716    /* Left corner: */
     
    751752    painter.fillRect(QRect(0, 5, 5, height() - 5), grad4);
    752753    painter.fillRect(QRect(width() - 5, 5, 5, height() - 5), grad5);
    753 #ifdef Q_WS_WIN
     754#if defined(Q_WS_WIN) || defined(Q_WS_X11)
    754755    painter.save();
    755756    painter.setPen(color3);
     
    759760    painter.drawLine(QLine(QPoint(5 + 1, height() - 1),               QPoint(5 + 1, 5 + 1)));
    760761    painter.restore();
    761 #endif /* Q_WS_WIN */
     762#endif /* Q_WS_WIN || Q_WS_X11 */
    762763
    763764    /* Paint drop token: */
     
    10751076    AssertPtrReturnVoid(statusBar());
    10761077    {
    1077 #if defined(Q_WS_WIN) || defined (Q_WS_MAC)
    10781078        /* Configure status-bar: */
    10791079        statusBar()->setContextMenuPolicy(Qt::CustomContextMenu);
    10801080        connect(statusBar(), SIGNAL(customContextMenuRequested(const QPoint&)),
    10811081                this, SLOT(sltShowStatusBarContextMenu(const QPoint&)));
    1082 #endif /* Q_WS_WIN || Q_WS_MAC */
    10831082        /* Create indicator-pool: */
    10841083        m_pIndicatorsPool = new UIIndicatorsPool(machineLogic()->uisession());
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