VirtualBox

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


Ignore:
Timestamp:
Jun 27, 2018 6:29:02 PM (6 years ago)
Author:
vboxsync
Message:

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

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

Legend:

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

    r72708 r72709  
    3030
    3131/* GUI includes: */
    32 # include "UIGChooser.h"
    3332# include "UIGChooserItemGroup.h"
    3433# include "UIGChooserItemMachine.h"
     
    114113    connect(this, SIGNAL(sigToggleStarted()), model(), SIGNAL(sigToggleStarted()));
    115114    connect(this, SIGNAL(sigToggleFinished()), model(), SIGNAL(sigToggleFinished()), Qt::QueuedConnection);
    116     connect(model()->chooser()->selector(), &UISelectorWindow::sigWindowRemapped,
     115    connect(gpSelectorWindow, &UISelectorWindow::sigWindowRemapped,
    117116            this, &UIGChooserItemGroup::sltHandleWindowRemapped);
    118117
     
    150149    connect(this, SIGNAL(sigToggleStarted()), model(), SIGNAL(sigToggleStarted()));
    151150    connect(this, SIGNAL(sigToggleFinished()), model(), SIGNAL(sigToggleFinished()));
    152     connect(model()->chooser()->selector(), &UISelectorWindow::sigWindowRemapped,
     151    connect(gpSelectorWindow, &UISelectorWindow::sigWindowRemapped,
    153152            this, &UIGChooserItemGroup::sltHandleWindowRemapped);
    154153
     
    556555{
    557556    const int iIconMetric = QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize);
    558     m_groupsPixmap = UIIconPool::iconSet(":/group_abstract_16px.png").pixmap(model()->chooser()->window()->windowHandle(),
     557    m_groupsPixmap = UIIconPool::iconSet(":/group_abstract_16px.png").pixmap(gpSelectorWindow->windowHandle(),
    559558                                                                             QSize(iIconMetric, iIconMetric));
    560     m_machinesPixmap = UIIconPool::iconSet(":/machine_abstract_16px.png").pixmap(model()->chooser()->window()->windowHandle(),
     559    m_machinesPixmap = UIIconPool::iconSet(":/machine_abstract_16px.png").pixmap(gpSelectorWindow->windowHandle(),
    561560                                                                                 QSize(iIconMetric, iIconMetric));
    562561    m_pixmapSizeGroups = m_groupsPixmap.size() / m_groupsPixmap.devicePixelRatio();
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp

    r72708 r72709  
    2727/* GUI includes: */
    2828# include "VBoxGlobal.h"
    29 # include "UIGChooser.h"
    3029# include "UIGChooserItemGroup.h"
    3130# include "UIGChooserItemMachine.h"
     
    6362
    6463    /* Configure connections: */
    65     connect(model()->chooser()->selector(), &UISelectorWindow::sigWindowRemapped,
     64    connect(gpSelectorWindow, &UISelectorWindow::sigWindowRemapped,
    6665            this, &UIGChooserItemMachine::sltHandleWindowRemapped);
    6766
     
    9089
    9190    /* Configure connections: */
    92     connect(model()->chooser()->selector(), &UISelectorWindow::sigWindowRemapped,
     91    connect(gpSelectorWindow, &UISelectorWindow::sigWindowRemapped,
    9392            this, &UIGChooserItemMachine::sltHandleWindowRemapped);
    9493
     
    271270    AssertReturnVoid(!stateIcon.isNull());
    272271    const QSize statePixmapSize = QSize(iIconMetric, iIconMetric);
    273     const QPixmap statePixmap = stateIcon.pixmap(model()->chooser()->window()->windowHandle(), statePixmapSize);
     272    const QPixmap statePixmap = stateIcon.pixmap(gpSelectorWindow->windowHandle(), statePixmapSize);
    274273    /* Update linked values: */
    275274    if (m_statePixmapSize != statePixmapSize)
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