VirtualBox

Changeset 88155 in vbox


Ignore:
Timestamp:
Mar 17, 2021 2:29:01 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9515: New VM wizard: A bit of layout fixes for 4th page.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic4.cpp

    r88065 r88155  
    204204{
    205205    QWidget *pWidget = new QWidget;
    206     QVBoxLayout *pLayout = new QVBoxLayout(pWidget);
    207     pLayout->setContentsMargins(0, 0, 0, 0);
    208 
    209     QHBoxLayout *pSizeLayout = new QHBoxLayout;
    210     pSizeLayout->setContentsMargins(0, 0, 0, 0);
    211     /* Hard disk size relate widgets: */
    212     m_pMediumSizeEditor = new UIMediumSizeEditor;
    213     m_pMediumSizeEditorLabel = new QLabel;
    214     if (m_pMediumSizeEditorLabel)
    215     {
    216         pSizeLayout->addWidget(m_pMediumSizeEditorLabel);
    217         m_pMediumSizeEditorLabel->setBuddy(m_pMediumSizeEditor);
    218     }
    219     pSizeLayout->addWidget(m_pMediumSizeEditor);
    220     pLayout->addLayout(pSizeLayout);
    221     /* Hard disk variant (dynamic vs. fixed) widgets: */
    222     pLayout->addWidget(createMediumVariantWidgets(false /* bool fWithLabels */));
     206    if (pWidget)
     207    {
     208        QVBoxLayout *pLayout = new QVBoxLayout(pWidget);
     209        if (pLayout)
     210        {
     211            pLayout->setContentsMargins(0, 0, 0, 0);
     212
     213            /* Prepare size layout: */
     214            QGridLayout *pSizeLayout = new QGridLayout;
     215            if (pSizeLayout)
     216            {
     217                pSizeLayout->setContentsMargins(0, 0, 0, 0);
     218
     219                /* Prepare Hard disk size label: */
     220                m_pMediumSizeEditorLabel = new QLabel(pWidget);
     221                if (m_pMediumSizeEditorLabel)
     222                {
     223                    m_pMediumSizeEditorLabel->setAlignment(Qt::AlignRight);
     224                    m_pMediumSizeEditorLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
     225                    pSizeLayout->addWidget(m_pMediumSizeEditorLabel, 0, 0, Qt::AlignBottom);
     226                }
     227                /* Prepare Hard disk size editor: */
     228                m_pMediumSizeEditor = new UIMediumSizeEditor(pWidget);
     229                if (m_pMediumSizeEditor)
     230                {
     231                    m_pMediumSizeEditorLabel->setBuddy(m_pMediumSizeEditor);
     232                    pSizeLayout->addWidget(m_pMediumSizeEditor, 0, 1, 2, 1);
     233                }
     234
     235                pLayout->addLayout(pSizeLayout);
     236            }
     237
     238            /* Hard disk variant (dynamic vs. fixed) widgets: */
     239            pLayout->addWidget(createMediumVariantWidgets(false /* bool fWithLabels */));
     240        }
     241    }
    223242
    224243    return pWidget;
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp

    r88154 r88155  
    382382    /* Disk file size widgets: */
    383383    m_pMediumSizeEditorLabel = new QLabel;
    384     m_pMediumSizeEditorLabel->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed);
     384    m_pMediumSizeEditorLabel->setAlignment(Qt::AlignRight);
     385    m_pMediumSizeEditorLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
    385386    m_pMediumSizeEditor = new UIMediumSizeEditor;
    386387    m_pMediumSizeEditorLabel->setBuddy(m_pMediumSizeEditor);
     
    401402    pDiskContainerLayout->addWidget(m_pLocationOpenButton, 0, 3, 1, 1);
    402403
    403     pDiskContainerLayout->addWidget(m_pMediumSizeEditorLabel, 1, 0, 1, 1);
     404    pDiskContainerLayout->addWidget(m_pMediumSizeEditorLabel, 1, 0, 1, 1, Qt::AlignBottom);
    404405    pDiskContainerLayout->addWidget(m_pMediumSizeEditor, 1, 1, 2, 3);
    405406
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