VirtualBox

Changeset 74932 in vbox


Ignore:
Timestamp:
Oct 18, 2018 7:00:41 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
125946
Message:

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

File:
1 edited

Legend:

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

    r74928 r74932  
    208208#endif
    209209        }
     210        else
     211        {
     212#ifdef VBOX_WS_MAC
     213            pLayout->setContentsMargins(13, 0, 13, 13);
     214            pLayout->setSpacing(10);
     215#else
     216            const int iL = qApp->style()->pixelMetric(QStyle::PM_LayoutLeftMargin) * 1.5;
     217            const int iT = qApp->style()->pixelMetric(QStyle::PM_LayoutTopMargin) * 1.5;
     218            const int iR = qApp->style()->pixelMetric(QStyle::PM_LayoutRightMargin) * 1.5;
     219            const int iB = qApp->style()->pixelMetric(QStyle::PM_LayoutBottomMargin) * 1.5;
     220            pLayout->setContentsMargins(iL, iT, iR, iB);
     221#endif
     222        }
    210223
    211224        /* Create name editor: */
     
    256269        if (m_enmEmbedding == EmbedTo_Stack)
    257270        {
    258             QVBoxLayout *pButtonBoxLayout = new QVBoxLayout;
    259             if (pButtonBoxLayout)
     271            /* Create button-box: */
     272            m_pButtonBox = new QIDialogButtonBox;
     273            if  (m_pButtonBox)
    260274            {
    261                 const int iR = qApp->style()->pixelMetric(QStyle::PM_LayoutRightMargin) / 4;
    262                 const int iB = qApp->style()->pixelMetric(QStyle::PM_LayoutBottomMargin) / 2;
    263                 pButtonBoxLayout->setContentsMargins(0, 0, iR, iB);
    264 
    265                 /* Create button-box: */
    266                 m_pButtonBox = new QIDialogButtonBox;
    267                 if  (m_pButtonBox)
    268                 {
    269                     m_pButtonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok);
    270                     connect(m_pButtonBox, &QIDialogButtonBox::clicked, this, &UICloudProfileDetailsWidget::sltHandleButtonBoxClick);
    271 
    272                     /* Add into layout: */
    273                     pButtonBoxLayout->addWidget(m_pButtonBox);
    274                 }
     275                m_pButtonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok);
     276                connect(m_pButtonBox, &QIDialogButtonBox::clicked, this, &UICloudProfileDetailsWidget::sltHandleButtonBoxClick);
    275277
    276278                /* Add into layout: */
    277                 pLayout->addLayout(pButtonBoxLayout, 2, 0, 1, 2);
     279                pLayout->addWidget(m_pButtonBox, 2, 0, 1, 2);
    278280            }
    279281        }
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