VirtualBox

Changeset 77779 in vbox


Ignore:
Timestamp:
Mar 19, 2019 10:16:57 AM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9378. Some margin and spacing corection on the search widget.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserSearchWidget.cpp

    r77765 r77779  
    1717
    1818/* Qt includes: */
     19#include <QStyle>
    1920#include <QVBoxLayout>
    2021
     
    6869    if (!m_pMainLayout)
    6970        return;
     71
     72#ifdef VBOX_WS_MAC
     73    m_pMainLayout->setContentsMargins(0, 5, 0, 5);
    7074    m_pMainLayout->setSpacing(2);
    71     m_pMainLayout->setContentsMargins(0, 0, 0, 0);
     75#else
     76    m_pMainLayout->setContentsMargins(qApp->style()->pixelMetric(QStyle::PM_LayoutLeftMargin) / 2,
     77                                      qApp->style()->pixelMetric(QStyle::PM_LayoutTopMargin) / 4,
     78                                      qApp->style()->pixelMetric(QStyle::PM_LayoutRightMargin) / 2,
     79                                      qApp->style()->pixelMetric(QStyle::PM_LayoutBottomMargin) / 4);
     80    m_pMainLayout->setSpacing(qApp->style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing) / 2);
     81#endif
    7282
    7383    m_pCloseButton = new QIToolButton;
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