VirtualBox

Changeset 88150 in vbox for trunk


Ignore:
Timestamp:
Mar 17, 2021 11:41:46 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
143299
Message:

FE/Qt: bugref:9515: New VM wizard: Few more layout fixes for 1st page; Labels of Name and Type OS editor now properly indents check-box.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINameAndSystemEditor.cpp

    r88149 r88150  
    277277}
    278278
     279int UINameAndSystemEditor::firstColumnWidth() const
     280{
     281    int iWidth = 0;
     282    if (m_pNameLabel)
     283        iWidth = qMax(iWidth, m_pNameLabel->width());
     284    if (m_pPathLabel)
     285        iWidth = qMax(iWidth, m_pPathLabel->width());
     286    if (m_pImageLabel)
     287        iWidth = qMax(iWidth, m_pImageLabel->width());
     288    if (m_pLabelFamily)
     289        iWidth = qMax(iWidth, m_pLabelFamily->width());
     290    if (m_pLabelType)
     291        iWidth = qMax(iWidth, m_pLabelType->width());
     292    return iWidth;
     293}
     294
    279295void UINameAndSystemEditor::retranslateUi()
    280296{
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINameAndSystemEditor.h

    r88149 r88150  
    128128      *  effectively changing the background color and error-text. */
    129129    void markImageEditor(bool fError, const QString &strErrorMessage);
     130
     131    /** Returns 1st column width. */
     132    int firstColumnWidth() const;
    130133
    131134protected:
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp

    r88149 r88150  
    180180UIWizardNewVMPage1::UIWizardNewVMPage1(const QString &strGroup)
    181181    : m_pNameAndSystemEditor(0)
    182     , m_pISOPathSelectorLabel(0)
    183182    , m_pSkipUnattendedCheckBox(0)
    184183    , m_strGroup(strGroup)
     
    240239    {
    241240        /* Prepare layout: */
    242         QVBoxLayout *pLayout = new QVBoxLayout(pContainerWidget);
    243         if (pLayout)
     241        m_pNameAndSystemLayout = new QGridLayout(pContainerWidget);
     242        if (m_pNameAndSystemLayout)
    244243        {
    245             pLayout->setContentsMargins(0, 0, 0, 0);
     244            m_pNameAndSystemLayout->setContentsMargins(0, 0, 0, 0);
    246245
    247246            /* Prepare Name and OS Type editor: */
     
    252251                                                               true /* fChooseType? */);
    253252            if (m_pNameAndSystemEditor)
    254                 pLayout->addWidget(m_pNameAndSystemEditor);
     253                m_pNameAndSystemLayout->addWidget(m_pNameAndSystemEditor, 0, 0, 1, 2);
    255254
    256255            /* Prepare Skip Unattended checkbox: */
    257256            m_pSkipUnattendedCheckBox = new QCheckBox;
    258257            if (m_pSkipUnattendedCheckBox)
    259                 pLayout->addWidget(m_pSkipUnattendedCheckBox);
     258                m_pNameAndSystemLayout->addWidget(m_pSkipUnattendedCheckBox, 1, 1);
    260259        }
    261260    }
     
    373372    {
    374373        m_pSkipUnattendedCheckBox->setText(UIWizardNewVM::tr("Skip unattended installation"));
    375         m_pSkipUnattendedCheckBox->setToolTip(UIWizardNewVM::tr("<p>When checked selected ISO file will be mounted to the CD drive "
    376                                                                 "of the virtual machine but the unattended installation will "
    377                                                                 "not start.</p>"));
     374        m_pSkipUnattendedCheckBox->setToolTip(UIWizardNewVM::tr("<p>When checked selected ISO file will be mounted to the CD "
     375                                                                "drive of the virtual machine but the unattended installation "
     376                                                                "will not start.</p>"));
    378377    }
    379378}
     
    546545
    547546    if (m_pNameOSTypeLabel)
    548         m_pNameOSTypeLabel->setText(UIWizardNewVM::tr("Please choose a descriptive name and destination folder for the new virtual machine. "
    549                                              "The name you choose will be used throughout VirtualBox "
    550                                              "to identify this machine."));
    551     if (m_pISOPathSelectorLabel)
    552         m_pISOPathSelectorLabel->setText(UIWizardNewVM::tr("&Installation ISO:"));
    553 
    554     if (m_pNameAndSystemEditor && m_pISOPathSelectorLabel)
    555         m_pNameAndSystemEditor->setMinimumLayoutIndent(m_pISOPathSelectorLabel->width());
     547        m_pNameOSTypeLabel->setText(UIWizardNewVM::tr("Please choose a descriptive name and destination folder for the new "
     548                                                      "virtual machine. The name you choose will be used throughout VirtualBox "
     549                                                      "to identify this machine."));
     550
     551    if (m_pNameAndSystemLayout && m_pNameAndSystemEditor)
     552        m_pNameAndSystemLayout->setColumnMinimumWidth(0, m_pNameAndSystemEditor->firstColumnWidth());
    556553}
    557554
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.h

    r88116 r88150  
    8989    /** @name Widgets
    9090     * @{ */
     91        QGridLayout           *m_pNameAndSystemLayout;
    9192        UINameAndSystemEditor *m_pNameAndSystemEditor;
    92         QLabel                *m_pISOPathSelectorLabel;
    9393        QCheckBox             *m_pSkipUnattendedCheckBox;
    9494    /** @} */
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