VirtualBox

Changeset 59819 in vbox


Ignore:
Timestamp:
Feb 25, 2016 6:24:12 PM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: Qt5 migration (part 99): Mac OS X: Translucency fixes for Qt5: 1. Attribute now must be set first before any sub-widget which propagates own background, 2. Composition rules for Mac OS X were finally synchronized with other hosts.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/runtime
Files:
3 edited

Legend:

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

    r59639 r59819  
    14591459    /* Set composition-mode to paint: */
    14601460    painter.setCompositionMode(QPainter::CompositionMode_SourceOver);
     1461
    14611462#if defined(VBOX_WITH_TRANSLUCENT_SEAMLESS)
    1462 # if defined(Q_WS_WIN) || defined(Q_WS_X11)
     1463# if defined(Q_WS_WIN) || defined(Q_WS_X11) || QT_VERSION >= 0x050000
    14631464    /* Replace translucent background with black one: */
    14641465    painter.setCompositionMode(QPainter::CompositionMode_Source);
    14651466    painter.fillRect(paintRect, QColor(Qt::black));
    14661467    painter.setCompositionMode(QPainter::CompositionMode_SourceAtop);
    1467 # endif /* Q_WS_WIN || Q_WS_X11 */
     1468# endif /* Q_WS_WIN || Q_WS_X11 || QT_VERSION >= 0x050000 */
    14681469#endif /* VBOX_WITH_TRANSLUCENT_SEAMLESS */
    1469     /* Paint rectangle: */
     1470
     1471    /* Draw image rectangle: */
    14701472    drawImageRect(painter, sourceImage, paintRect,
    14711473                  m_pMachineView->contentsX(), m_pMachineView->contentsY(),
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp

    r58943 r59819  
    115115    prepareStatusBar();
    116116
     117    /* Prepare visual-state: */
     118    prepareVisualState();
     119
    117120    /* Prepare machine-view: */
    118121    prepareMachineView();
    119 
    120     /* Prepare visual-state: */
    121     prepareVisualState();
    122122
    123123    /* Prepare handlers: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp

    r59814 r59819  
    8787
    8888#ifdef VBOX_WITH_TRANSLUCENT_SEAMLESS
    89 # ifdef Q_WS_MAC
     89# if defined(Q_WS_MAC) && QT_VERSION < 0x050000
    9090    /* Using native API to enable translucent background for the Mac host.
    9191     * - We also want to disable window-shadows which is possible
     
    9393     *   while minimum supported version is 4.7.1 for now: */
    9494    ::darwinSetShowsWindowTransparent(this, true);
    95 # else /* Q_WS_MAC */
     95# else /* !Q_WS_MAC || QT_VERSION >= 0x050000 */
    9696    /* Using Qt API to enable translucent background:
    9797     * - Under Win host Qt conflicts with 3D stuff (black seamless regions).
     
    9999     *   until version 4.8, but minimum supported version is 4.7.1 for now. */
    100100    setAttribute(Qt::WA_TranslucentBackground);
    101 # endif /* !Q_WS_MAC */
     101# endif /* !Q_WS_MAC || QT_VERSION >= 0x050000 */
    102102#endif /* VBOX_WITH_TRANSLUCENT_SEAMLESS */
    103103
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