VirtualBox

Changeset 50932 in vbox


Ignore:
Timestamp:
Mar 31, 2014 4:01:12 PM (11 years ago)
Author:
vboxsync
Message:

FE/Qt: Selector UI: Chooser pane: Position icons by top-left point, not by rectangle (requirement for HiDPI painting support).

Location:
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItem.cpp

    r44051 r50932  
    354354
    355355/* static */
    356 void UIGChooserItem::paintPixmap(QPainter *pPainter, const QRect &rect, const QPixmap &pixmap)
    357 {
    358     pPainter->drawPixmap(rect, pixmap);
     356void UIGChooserItem::paintPixmap(QPainter *pPainter, const QPoint &point, const QPixmap &pixmap)
     357{
     358    pPainter->drawPixmap(point, pixmap);
    359359}
    360360
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItem.h

    r44051 r50932  
    162162    static void configurePainterShape(QPainter *pPainter, const QStyleOptionGraphicsItem *pOption, int iRadius);
    163163    static void paintFrameRect(QPainter *pPainter, const QRect &rect, bool fIsSelected, int iRadius);
    164     static void paintPixmap(QPainter *pPainter, const QRect &rect, const QPixmap &pixmap);
     164    static void paintPixmap(QPainter *pPainter, const QPoint &point, const QPixmap &pixmap);
    165165    static void paintText(QPainter *pPainter, QPoint point,
    166166                          const QFont &font, QPaintDevice *pPaintDevice,
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.cpp

    r46623 r50932  
    17351735            paintPixmap(/* Painter: */
    17361736                        pPainter,
    1737                         /* Rectangle to paint in: */
    1738                         QRect(QPoint(iMachinePixmapX, iMachinePixmapY), m_pixmapSizeMachines),
     1737                        /* Point to paint in: */
     1738                        QPoint(iMachinePixmapX, iMachinePixmapY),
    17391739                        /* Pixmap to paint: */
    17401740                        m_machinesPixmap);
     
    17651765            paintPixmap(/* Painter: */
    17661766                        pPainter,
    1767                         /* Rectangle to paint in: */
    1768                         QRect(QPoint(iGroupPixmapX, iGroupPixmapY), m_pixmapSizeGroups),
     1767                        /* Point to paint in: */
     1768                        QPoint(iGroupPixmapX, iGroupPixmapY),
    17691769                        /* Pixmap to paint: */
    17701770                        m_groupsPixmap);
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp

    r47160 r50932  
    952952        paintPixmap(/* Painter: */
    953953                    pPainter,
    954                     /* Rectangle to paint in: */
    955                     QRect(QPoint(iMachinePixmapX, iMachinePixmapY), m_pixmapSize),
     954                    /* Point to paint in: */
     955                    QPoint(iMachinePixmapX, iMachinePixmapY),
    956956                    /* Pixmap to paint: */
    957957                    m_pixmap);
     
    10291029                paintPixmap(/* Painter: */
    10301030                            pPainter,
    1031                             /* Rectangle to paint in: */
    1032                             QRect(QPoint(iMachineStatePixmapX, iMachineStatePixmapY), m_statePixmapSize),
     1031                            /* Point to paint in: */
     1032                            QPoint(iMachineStatePixmapX, iMachineStatePixmapY),
    10331033                            /* Pixmap to paint: */
    10341034                            m_statePixmap);
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