VirtualBox

Changeset 52868 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Sep 26, 2014 12:38:53 PM (10 years ago)
Author:
vboxsync
Message:

FE/Qt: X11: Mini-toolbar: Shape should be enabled only if composition enabled.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp

    r52794 r52868  
    3131# include <QStateMachine>
    3232# include <QPainter>
     33# ifdef Q_WS_X11
     34#  include <QX11Info>
     35# endif /* Q_WS_X11 */
    3336
    3437/* GUI includes: */
     
    3942# ifdef Q_WS_MAC
    4043#  include "VBoxUtils-darwin.h"
    41 # endif
     44# endif /* Q_WS_MAC */
    4245
    4346#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
     
    570573
    571574    /* Left margin: */
     575#ifdef Q_WS_X11
     576    if (QX11Info::isCompositingManagerRunning())
     577        m_spacings << widgetForAction(addWidget(new QWidget));
     578#else /* !Q_WS_X11 */
    572579    m_spacings << widgetForAction(addWidget(new QWidget));
     580#endif /* !Q_WS_X11 */
    573581
    574582    /* Prepare push-pin: */
     
    622630
    623631    /* Right margin: */
     632#ifdef Q_WS_X11
     633    if (QX11Info::isCompositingManagerRunning())
     634        m_spacings << widgetForAction(addWidget(new QWidget));
     635#else /* !Q_WS_X11 */
    624636    m_spacings << widgetForAction(addWidget(new QWidget));
     637#endif /* !Q_WS_X11 */
    625638
    626639    /* Resize to sizehint: */
     
    630643void UIMiniToolBar::rebuildShape()
    631644{
     645#ifdef Q_WS_X11
     646    if (!QX11Info::isCompositingManagerRunning())
     647        return;
     648#endif /* Q_WS_X11 */
     649
    632650    /* Rebuild shape: */
    633651    QPainterPath shape;
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