VirtualBox

Changeset 76948 in vbox


Ignore:
Timestamp:
Jan 23, 2019 9:29:29 AM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9080: Getting contents margins from the style

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.cpp

    r76947 r76948  
    171171
    172172    /* Configure layout: */
    173     m_pMainLayout->setContentsMargins(1, 1, 1, 1);
     173    const int iL = qApp->style()->pixelMetric(QStyle::PM_LayoutLeftMargin) / 2;
     174    const int iT = qApp->style()->pixelMetric(QStyle::PM_LayoutTopMargin) / 2;
     175    const int iR = qApp->style()->pixelMetric(QStyle::PM_LayoutRightMargin) / 2;
     176    const int iB = qApp->style()->pixelMetric(QStyle::PM_LayoutBottomMargin) / 2;
     177    m_pMainLayout->setContentsMargins(iL, iT, iR, iB);
    174178#ifdef VBOX_WS_MAC
    175179    m_pMainLayout->setSpacing(10);
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