VirtualBox

Changeset 108124 in vbox


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

FE/Qt: bugref:10814: VBox Manager / Tools pane: Smaller margins for non-macOS hosts.

File:
1 edited

Legend:

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

    r108123 r108124  
    289289    /* Add 2 margins by default: */
    290290    iProposedWidth += 2 * iMargin;
     291#ifdef VBOX_WS_MAC
    291292    /* Additional 3 margins for widget mode: */
    292293    if (!model()->tools()->isPopup())
    293294        iProposedWidth += 3 * iMargin;
     295#else
     296    /* Additional 1 margin for widget mode: */
     297    if (!model()->tools()->isPopup())
     298        iProposedWidth += iMargin;
     299#endif
    294300
    295301    /* Add pixmap size by default: */
     
    775781            subRect.setHeight(m_pixmap.height() / m_pixmap.devicePixelRatio() + iPadding * 2);
    776782            subRect.setWidth(subRect.height());
     783#ifdef VBOX_WS_MAC
    777784            subRect.moveTopLeft(rectangle.topLeft() + QPoint(2.5 * iMargin - iPadding, iMargin - iPadding));
     785#else
     786            subRect.moveTopLeft(rectangle.topLeft() + QPoint(1.5 * iMargin - iPadding, iMargin - iPadding));
     787#endif
    778788
    779789            /* Paint icon frame: */
     
    883893    {
    884894        /* Prepare variables: */
     895#ifdef VBOX_WS_MAC
    885896        const int iPixmapX = model()->tools()->isPopup() ? iMargin : 2.5 * iMargin;
     897#else
     898        const int iPixmapX = model()->tools()->isPopup() ? iMargin : 1.5 * iMargin;
     899#endif
    886900        const int iPixmapY = (iFullHeight - m_pixmap.height() / m_pixmap.devicePixelRatio()) / 2;
    887901        /* Paint pixmap: */
     
    897911    {
    898912        /* Prepare variables: */
     913#ifdef VBOX_WS_MAC
    899914        const int iNameX = model()->tools()->isPopup() ? iMargin + m_pixmapSize.width() + iSpacing
    900915                                                       : 2.5 * iMargin + m_pixmapSize.width() + 2 * iSpacing;
     916#else
     917        const int iNameX = model()->tools()->isPopup() ? iMargin + m_pixmapSize.width() + iSpacing
     918                                                       : 1.5 * iMargin + m_pixmapSize.width() + 2 * iSpacing;
     919#endif
    901920        const int iNameY = (iFullHeight - m_nameSize.height()) / 2;
    902921        /* 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