VirtualBox

Changeset 74895 in vbox


Ignore:
Timestamp:
Oct 17, 2018 10:38:47 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
125889
Message:

FE/Qt: bugref:9230: A bit of layout fixes for Cloud Profile Manager.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/cloud/UICloudProfileDetailsWidget.cpp

    r74893 r74895  
    110110    if (pLayout)
    111111    {
    112         /// @todo sync layout margins with other tools!
     112        /* Configure layout: */
     113        pLayout->setContentsMargins(0, 0, 0, 0);
    113114
    114115        /* Create tab-widget: */
     
    128129        if (m_enmEmbedding == EmbedTo_Stack)
    129130        {
    130             /* Create button-box: */
    131             m_pButtonBox = new QIDialogButtonBox;
    132             AssertPtrReturnVoid(m_pButtonBox);
    133             /* Configure button-box: */
    134             m_pButtonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok);
    135             connect(m_pButtonBox, &QIDialogButtonBox::clicked, this, &UICloudProfileDetailsWidget::sltHandleButtonBoxClick);
    136 
    137             /* Add into layout: */
    138             pLayout->addWidget(m_pButtonBox);
     131            QVBoxLayout *pButtonBoxLayout = new QVBoxLayout;
     132            if (pButtonBoxLayout)
     133            {
     134                const int iR = qApp->style()->pixelMetric(QStyle::PM_LayoutRightMargin) / 4;
     135                const int iB = qApp->style()->pixelMetric(QStyle::PM_LayoutBottomMargin) / 2;
     136                pButtonBoxLayout->setContentsMargins(0, 0, iR, iB);
     137
     138                /* Create button-box: */
     139                m_pButtonBox = new QIDialogButtonBox;
     140                if  (m_pButtonBox)
     141                {
     142                    m_pButtonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok);
     143                    connect(m_pButtonBox, &QIDialogButtonBox::clicked, this, &UICloudProfileDetailsWidget::sltHandleButtonBoxClick);
     144
     145                    /* Add into layout: */
     146                    pButtonBoxLayout->addWidget(m_pButtonBox);
     147                }
     148
     149                /* Add into layout: */
     150                pLayout->addLayout(pButtonBoxLayout);
     151            }
    139152        }
    140153    }
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