VirtualBox

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


Ignore:
Timestamp:
Feb 9, 2025 5:51:31 PM (3 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
167422
Message:

FE/Qt: bugref:10814: VBox Manager / Tools pane: A bit of extra-spacing for tool item's icon and name in widget mode.

File:
1 edited

Legend:

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

    r108106 r108123  
    287287    int iProposedWidth = 0;
    288288
    289     /* Two margins: */
     289    /* Add 2 margins by default: */
    290290    iProposedWidth += 2 * iMargin;
     291    /* Additional 3 margins for widget mode: */
    291292    if (!model()->tools()->isPopup())
    292293        iProposedWidth += 3 * iMargin;
    293     /* And Tools-item content to take into account: */
    294     int iToolsItemWidth = m_pixmapSize.width();
     294
     295    /* Add pixmap size by default: */
     296    iProposedWidth += m_pixmapSize.width();
     297
     298    /* Add text size for popup mode or
     299     * if it's requested for widget mode: */
    295300    if (   model()->tools()->isPopup()
    296301        || model()->showItemNames())
    297         iToolsItemWidth += iSpacing + m_nameSize.width();
    298     iProposedWidth += iToolsItemWidth;
     302    {
     303        iProposedWidth += m_nameSize.width();
     304
     305        /* Add 1 spacing by default: */
     306        iProposedWidth += iSpacing;
     307        /* Additional 1 spacing for widget mode: */
     308        if (!model()->tools()->isPopup())
     309            iProposedWidth += iSpacing;
     310    }
    299311
    300312    /* Return result: */
     
    886898        /* Prepare variables: */
    887899        const int iNameX = model()->tools()->isPopup() ? iMargin + m_pixmapSize.width() + iSpacing
    888                                                        : 2.5 * iMargin + m_pixmapSize.width() + iSpacing;
     900                                                       : 2.5 * iMargin + m_pixmapSize.width() + 2 * iSpacing;
    889901        const int iNameY = (iFullHeight - m_nameSize.height()) / 2;
    890902        /* Paint name (always for popup mode, if requested otherwise): */
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