VirtualBox

Changeset 72707 in vbox for trunk


Ignore:
Timestamp:
Jun 27, 2018 5:24:41 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
123236
Message:

FE/Qt: bugref:8694: Adjust icons when moving GUI between screen with different DPI: Chooser pane, additionally to r123233.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp

    r72705 r72707  
    13081308    switch (pEvent->type())
    13091309    {
     1310        /* Handle every ScreenChangeInternal event to notify listeners: */
     1311        case QEvent::ScreenChangeInternal:
     1312        {
     1313            emit sigWindowRemapped();
     1314            break;
     1315        }
    13101316        /* Handle every Resize and Move we keep track of the geometry. */
    13111317        case QEvent::Resize:
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.h

    r72363 r72707  
    5050{
    5151    Q_OBJECT;
     52
     53signals:
     54
     55    /** Notifies listeners about this window remapped onto another screen. */
     56    void sigWindowRemapped();
    5257
    5358public:
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp

    r72704 r72707  
    3636# include "UIActionPoolSelector.h"
    3737# include "UIImageTools.h"
     38# include "UISelectorWindow.h"
    3839
    3940/* COM includes: */
     
    6162    setZValue(parentItem()->zValue() + 1);
    6263
     64    /* Configure connections: */
     65    connect(model()->chooser()->selector(), &UISelectorWindow::sigWindowRemapped,
     66            this, &UIGChooserItemMachine::sltHandleWindowRemapped);
     67
    6368    /* Init: */
    6469    updatePixmaps();
     
    8388    parentItem()->addItem(this, iPosition);
    8489    setZValue(parentItem()->zValue() + 1);
     90
     91    /* Configure connections: */
     92    connect(model()->chooser()->selector(), &UISelectorWindow::sigWindowRemapped,
     93            this, &UIGChooserItemMachine::sltHandleWindowRemapped);
    8594
    8695    /* Init: */
     
    192201}
    193202
     203void UIGChooserItemMachine::sltHandleWindowRemapped()
     204{
     205    /* Recache and update pixmaps: */
     206    recachePixmap();
     207    updatePixmaps();
     208}
     209
    194210QVariant UIGChooserItemMachine::data(int iKey) const
    195211{
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.h

    r72704 r72707  
    6868                                      QList<UIGChooserItemMachine*> &ol,
    6969                                      int iEnumerationFlags = 0);
     70
     71public slots:
     72
     73    /** Handles top-level window remaps. */
     74    void sltHandleWindowRemapped();
    7075
    7176private:
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette