VirtualBox

Changeset 64593 in vbox for trunk


Ignore:
Timestamp:
Nov 7, 2016 3:20:23 PM (8 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:8653: Fixing Unscaled HiDPI Output feature for Qt5.

File:
1 edited

Legend:

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

    r62493 r64593  
    13811381#ifdef VBOX_WS_MAC
    13821382# if QT_VERSION >= 0x050000
     1383    /* On OSX for Qt5 we need to erase backing store first: */
     1384    QRect eraseRect = paintRect;
     1385    /* Take the backing-scale-factor into account: */
     1386    if (useUnscaledHiDPIOutput() && backingScaleFactor() > 1.0)
     1387    {
     1388        eraseRect.moveTo(eraseRect.topLeft() / backingScaleFactor());
     1389        eraseRect.setSize(eraseRect.size() / backingScaleFactor());
     1390    }
    13831391    /* Replace translucent background with black one: */
    13841392    painter.setCompositionMode(QPainter::CompositionMode_Source);
    1385     painter.fillRect(paintRect, QColor(Qt::black));
     1393    painter.fillRect(eraseRect, QColor(Qt::black));
    13861394    painter.setCompositionMode(QPainter::CompositionMode_SourceAtop);
    13871395# endif /* QT_VERSION >= 0x050000 */
     
    14591467#if defined(VBOX_WITH_TRANSLUCENT_SEAMLESS)
    14601468# if defined(VBOX_WS_WIN) || defined(VBOX_WS_X11) || QT_VERSION >= 0x050000
     1469    /* On OSX for Qt5 we need to erase backing store first: */
     1470    QRect eraseRect = paintRect;
     1471    /* Take the backing-scale-factor into account: */
     1472    if (useUnscaledHiDPIOutput() && backingScaleFactor() > 1.0)
     1473    {
     1474        eraseRect.moveTo(eraseRect.topLeft() / backingScaleFactor());
     1475        eraseRect.setSize(eraseRect.size() / backingScaleFactor());
     1476    }
    14611477    /* Replace translucent background with black one: */
    14621478    painter.setCompositionMode(QPainter::CompositionMode_Source);
    1463     painter.fillRect(paintRect, QColor(Qt::black));
     1479    painter.fillRect(eraseRect, QColor(Qt::black));
    14641480    painter.setCompositionMode(QPainter::CompositionMode_SourceAtop);
    14651481# endif /* VBOX_WS_WIN || VBOX_WS_X11 || QT_VERSION >= 0x050000 */
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