VirtualBox

Ignore:
Timestamp:
Mar 9, 2022 8:59:05 AM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:6899: Global preferences: Reworking Interface page to increase page accessibility.

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

Legend:

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

    r94144 r94145  
    2727
    2828
    29 UIColorThemeEditor::UIColorThemeEditor(QWidget *pParent /* = 0 */, bool fWithLabel /* = false */)
     29UIColorThemeEditor::UIColorThemeEditor(QWidget *pParent /* = 0 */)
    3030    : QIWithRetranslateUI<QWidget>(pParent)
    31     , m_fWithLabel(fWithLabel)
    3231    , m_enmValue(UIColorThemeType_Auto)
    3332    , m_pLabel(0)
     
    7271            m_pCombo->setItemText(i, gpConverter->toString(enmType));
    7372        }
     73        m_pCombo->setToolTip(tr("Selects the color theme. It can be Light, Dark or automatically detected (default)."));
    7474    }
    7575}
     
    8888    {
    8989        pMainLayout->setContentsMargins(0, 0, 0, 0);
    90         int iRow = 0;
    9190
    9291        /* Create label: */
    93         if (m_fWithLabel)
    94             m_pLabel = new QLabel(this);
     92        m_pLabel = new QLabel(this);
    9593        if (m_pLabel)
    96             pMainLayout->addWidget(m_pLabel, 0, iRow++, 1, 1);
     94            pMainLayout->addWidget(m_pLabel, 0, 0);
    9795
    9896        /* Create combo layout: */
     
    104102            if (m_pCombo)
    105103            {
    106                 setFocusProxy(m_pCombo->focusProxy());
    107104                /* This is necessary since contents is dynamical now: */
    108105                m_pCombo->setSizeAdjustPolicy(QComboBox::AdjustToContents);
    109106                if (m_pLabel)
    110                     m_pLabel->setBuddy(m_pCombo->focusProxy());
     107                    m_pLabel->setBuddy(m_pCombo);
    111108                connect(m_pCombo, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
    112109                        this, &UIColorThemeEditor::sltHandleCurrentIndexChanged);
     
    118115
    119116            /* Add combo-layout into main-layout: */
    120             pMainLayout->addLayout(pComboLayout, 0, iRow++, 1, 1);
     117            pMainLayout->addLayout(pComboLayout, 0, 1);
    121118        }
    122119    }
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIColorThemeEditor.h

    r94144 r94145  
    4646public:
    4747
    48     /** Constructs color theme editor passing @a pParent to the base-class.
    49       * @param  fWithLabel  Brings whether we should add label ourselves. */
    50     UIColorThemeEditor(QWidget *pParent = 0, bool fWithLabel = false);
     48    /** Constructs color theme editor passing @a pParent to the base-class. */
     49    UIColorThemeEditor(QWidget *pParent = 0);
    5150
    5251    /** Defines editor @a enmValue. */
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInterface.cpp

    r93818 r94145  
    5757UIGlobalSettingsInterface::UIGlobalSettingsInterface()
    5858    : m_pCache(0)
    59     , m_pLabelColorTheme(0)
    6059    , m_pEditorColorTheme(0)
    6160{
     
    119118void UIGlobalSettingsInterface::retranslateUi()
    120119{
    121     m_pLabelColorTheme->setText(tr("Color &Theme:"));
    122     m_pEditorColorTheme->setToolTip(tr("Selects the color theme. It can be Light, Dark or automatically detected (default)."));
    123120}
    124121
     
    142139    if (pLayoutMain)
    143140    {
    144         pLayoutMain->setColumnStretch(1, 1);
    145141        pLayoutMain->setRowStretch(1, 1);
    146142
    147         /* Prepare color-theme label: */
    148         m_pLabelColorTheme = new QLabel(this);
    149         if (m_pLabelColorTheme)
    150         {
    151             m_pLabelColorTheme->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
    152             pLayoutMain->addWidget(m_pLabelColorTheme, 0, 0);
    153         }
    154143        /* Prepare color-theme editor: */
    155144        m_pEditorColorTheme = new UIColorThemeEditor(this);
    156145        if (m_pEditorColorTheme)
    157         {
    158             m_pLabelColorTheme->setBuddy(m_pEditorColorTheme->focusProxy());
    159             pLayoutMain->addWidget(m_pEditorColorTheme, 0, 1);
    160         }
     146            pLayoutMain->addWidget(m_pEditorColorTheme, 0, 0);
    161147    }
    162148}
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInterface.h

    r93990 r94145  
    8080     * @{ */
    8181        /** Holds the color theme label instance. */
    82         QLabel             *m_pLabelColorTheme;
    83         /** Holds the color theme label instance. */
    8482        UIColorThemeEditor *m_pEditorColorTheme;
    8583    /** @} */
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