VirtualBox

Ignore:
Timestamp:
Mar 17, 2022 12:20:06 PM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:6899: A bit of cleanup for Global preferences layout code.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/settings/global
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.cpp

    r93935 r94288  
    149149{
    150150    /* Prepare main layout: */
    151     QVBoxLayout *pLayoutMain = new QVBoxLayout(this);
    152     if (pLayoutMain)
     151    QVBoxLayout *pLayout = new QVBoxLayout(this);
     152    if (pLayout)
    153153    {
    154154        /* Prepare 'default machine folder' editor: */
    155155        m_pEditorDefaultMachineFolder = new UIDefaultMachineFolderEditor(this);
    156156        if (m_pEditorDefaultMachineFolder)
    157             pLayoutMain->addWidget(m_pEditorDefaultMachineFolder);
     157            pLayout->addWidget(m_pEditorDefaultMachineFolder);
    158158
    159159        /* Prepare 'VRDE auth library' editor: */
    160160        m_pEditorVRDEAuthLibrary = new UIVRDEAuthLibraryEditor(this);
    161161        if (m_pEditorVRDEAuthLibrary)
    162             pLayoutMain->addWidget(m_pEditorVRDEAuthLibrary);
     162            pLayout->addWidget(m_pEditorVRDEAuthLibrary);
    163163
    164164        /* Add stretch to the end: */
    165         pLayoutMain->addStretch();
     165        pLayout->addStretch();
    166166    }
    167167}
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.cpp

    r93936 r94288  
    196196{
    197197    /* Prepare main layout: */
    198     QVBoxLayout *pLayoutMain = new QVBoxLayout(this);
    199     if (pLayoutMain)
     198    QVBoxLayout *pLayout = new QVBoxLayout(this);
     199    if (pLayout)
    200200    {
    201201        /* Prepare 'shortcut configuration' editor: */
    202202        m_pEditorShortcutConfiguration = new UIShortcutConfigurationEditor(this);
    203203        if (m_pEditorShortcutConfiguration)
    204             pLayoutMain->addWidget(m_pEditorShortcutConfiguration);
     204            pLayout->addWidget(m_pEditorShortcutConfiguration);
    205205
    206206        /* Prepare 'auto capture keyboard' editor: */
    207207        m_pEditorAutoCaptureKeyboard = new UIAutoCaptureKeyboardEditor(this);
    208208        if (m_pEditorAutoCaptureKeyboard)
    209             pLayoutMain->addWidget(m_pEditorAutoCaptureKeyboard);
     209            pLayout->addWidget(m_pEditorAutoCaptureKeyboard);
    210210    }
    211211}
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInterface.cpp

    r94145 r94288  
    1717
    1818/* Qt includes: */
    19 #include <QGridLayout>
    2019#include <QLabel>
     20#include <QVBoxLayout>
    2121
    2222/* GUI includes: */
     
    136136{
    137137    /* Prepare main layout: */
    138     QGridLayout *pLayoutMain = new QGridLayout(this);
    139     if (pLayoutMain)
     138    QVBoxLayout *pLayout = new QVBoxLayout(this);
     139    if (pLayout)
    140140    {
    141         pLayoutMain->setRowStretch(1, 1);
    142 
    143141        /* Prepare color-theme editor: */
    144142        m_pEditorColorTheme = new UIColorThemeEditor(this);
    145143        if (m_pEditorColorTheme)
    146             pLayoutMain->addWidget(m_pEditorColorTheme, 0, 0);
     144            pLayout->addWidget(m_pEditorColorTheme);
     145
     146        /* Add stretch to the end: */
     147        pLayout->addStretch();
    147148    }
    148149}
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsLanguage.cpp

    r93115 r94288  
    133133{
    134134    /* Prepare main layout: */
    135     QVBoxLayout *pLayoutMain = new QVBoxLayout(this);
    136     if (pLayoutMain)
     135    QVBoxLayout *pLayout = new QVBoxLayout(this);
     136    if (pLayout)
    137137    {
    138138        /* Prepare language settings editor: */
    139139        m_pEditorLanguageSettings = new UILanguageSettingsEditor(this);
    140140        if (m_pEditorLanguageSettings)
    141             pLayoutMain->addWidget(m_pEditorLanguageSettings);
     141            pLayout->addWidget(m_pEditorLanguageSettings);
    142142    }
    143143}
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsUpdate.cpp

    r93115 r94288  
    133133{
    134134    /* Prepare main layout: */
    135     QVBoxLayout *pLayoutMain = new QVBoxLayout(this);
    136     if (pLayoutMain)
     135    QVBoxLayout *pLayout = new QVBoxLayout(this);
     136    if (pLayout)
    137137    {
    138138        /* Prepare update settings editor: */
    139139        m_pEditorUpdateSettings = new UIUpdateSettingsEditor(this);
    140140        if (m_pEditorUpdateSettings)
    141             pLayoutMain->addWidget(m_pEditorUpdateSettings);
     141            pLayout->addWidget(m_pEditorUpdateSettings);
     142
     143        /* Add stretch to the end: */
     144        pLayout->addStretch();
    142145    }
    143146}
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