VirtualBox

Changeset 108035 in vbox


Ignore:
Timestamp:
Feb 3, 2025 5:33:51 PM (6 weeks ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
167308
Message:

FE/Qt: bugref:10814: VBox Manager / Tools pane: Fixes for tool item icon and text location calculations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsItem.cpp

    r108034 r108035  
    847847    {
    848848        /* Prepare variables: */
    849         int iPixmapX = model()->tools()->isPopup() ? iMargin : 2 * iMargin;
    850         int iPixmapY = (iFullHeight - m_pixmap.height() / m_pixmap.devicePixelRatio()) / 2;
     849        const int iPixmapX = model()->tools()->isPopup() ? iMargin : 2 * iMargin;
     850        const int iPixmapY = (iFullHeight - m_pixmap.height() / m_pixmap.devicePixelRatio()) / 2;
    851851        /* Paint pixmap: */
    852852        paintPixmap(/* Painter: */
     
    861861    {
    862862        /* Prepare variables: */
    863         int iNameX = iMargin + m_pixmapSize.width() + iSpacing;
    864         int iNameY = (iFullHeight - m_nameSize.height()) / 2;
    865         /* Paint name: */
    866         if (model()->tools()->isPopup())
     863        const int iNameX = model()->tools()->isPopup() ? iMargin + m_pixmapSize.width() + iSpacing
     864                                                       : 2 * iMargin + m_pixmapSize.width() + iSpacing;
     865        const int iNameY = (iFullHeight - m_nameSize.height()) / 2;
     866        /* Paint name (always for popup mode, if requested otherwise): */
     867        if (   model()->tools()->isPopup()
     868            || model()->showItemNames())
    867869            paintText(/* Painter: */
    868870                      pPainter,
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