VirtualBox

Changeset 75156 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Oct 29, 2018 3:55:39 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9241: VirtualBox Manager: Chooser pane: Also fix drag object pixmap bug (it should take into account device pixel ratio as well), s.a. r126232.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemMachine.cpp

    r75154 r75156  
    2222/* Qt includes: */
    2323# include <QGraphicsScene>
     24# include <QGraphicsSceneMouseEvent>
    2425# include <QGraphicsView>
    2526# include <QPainter>
    2627# include <QStyleOptionGraphicsItem>
    27 # include <QGraphicsSceneMouseEvent>
     28# include <QWindow>
    2829
    2930/* GUI includes: */
     
    498499{
    499500    /* Ask item to paint itself into pixmap: */
    500     const QSize actualSize = size().toSize();
    501     QPixmap pixmap(actualSize);
     501    qreal dDpr = gpManager->windowHandle()->devicePixelRatio();
     502    QSize actualSize = size().toSize();
     503    QPixmap pixmap(actualSize * dDpr);
     504    pixmap.setDevicePixelRatio(dDpr);
    502505    QPainter painter(&pixmap);
    503506    QStyleOptionGraphicsItem options;
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