VirtualBox

Changeset 94357 in vbox


Ignore:
Timestamp:
Mar 24, 2022 2:42:20 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
150663
Message:

FE/Qt/Ds: bugref:6899: Machine settings: Display page accessibility improvements for Screen tab, part 2.

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

Legend:

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

    r93992 r94357  
    3333
    3434
    35 UIScaleFactorEditor::UIScaleFactorEditor(QWidget *pParent, bool fWithLabels /* = false */)
     35UIScaleFactorEditor::UIScaleFactorEditor(QWidget *pParent)
    3636    : QIWithRetranslateUI<QWidget>(pParent)
    37     , m_fWithLabels(fWithLabels)
    3837    , m_pLayout(0)
    3938    , m_pLabel(0)
     
    236235
    237236        /* Prepare label: */
    238         if (m_fWithLabels)
    239         {
    240             m_pLabel = new QLabel(this);
    241             if (m_pLabel)
    242             {
    243                 m_pLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
    244                 m_pLayout->addWidget(m_pLabel, 0, 0);
    245             }
     237        m_pLabel = new QLabel(this);
     238        if (m_pLabel)
     239        {
     240            m_pLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
     241            m_pLayout->addWidget(m_pLabel, 0, 0);
    246242        }
    247243
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIScaleFactorEditor.h

    r93992 r94357  
    4343public:
    4444
    45     /** Creates scale factor editor passing @a pParent to the base-class.
    46       * @param  fWithLabels  Brings whether we should add labels ourselves. */
    47     UIScaleFactorEditor(QWidget *pParent, bool fWithLabels = false);
     45    /** Creates scale factor editor passing @a pParent to the base-class. */
     46    UIScaleFactorEditor(QWidget *pParent);
    4847
    4948    /** Defines @a iMonitorCount. */
     
    101100    /** @name Member widgets.
    102101      * @{ */
    103         bool              m_fWithLabels;
    104102        QGridLayout      *m_pLayout;
    105103        QLabel           *m_pLabel;
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsDisplay.cpp

    r94323 r94357  
    178178
    179179        /* Prepare 'scale-factor' editor: */
    180         m_pEditorScaleFactor = new UIScaleFactorEditor(this, true /* with label */);
     180        m_pEditorScaleFactor = new UIScaleFactorEditor(this);
    181181        if (m_pEditorScaleFactor)
    182182            pLayout->addWidget(m_pEditorScaleFactor);
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp

    r94341 r94357  
    310310    , m_pLabelMonitorCountMin(0)
    311311    , m_pLabelMonitorCountMax(0)
    312     , m_pLabelScaleFactor(0)
    313312    , m_pEditorScaleFactor(0)
    314313    , m_pLabelGraphicsController(0)
     
    327326    , m_pLabelRemoteDisplayOptions(0)
    328327    , m_pCheckboxMultipleConn(0)
    329 
    330328    , m_pTabRecording(0)
    331329    , m_pCheckboxRecording(0)
     
    362360    , m_pScrollerRecordingScreens(0)
    363361{
    364     /* Prepare: */
    365362    prepare();
    366363}
     
    368365UIMachineSettingsDisplay::~UIMachineSettingsDisplay()
    369366{
    370     /* Cleanup: */
    371367    cleanup();
    372368}
     
    781777    m_pSliderMonitorCount->setToolTip(tr("Controls the amount of virtual monitors provided to the virtual machine."));
    782778    m_pSpinboxMonitorCount->setToolTip(tr("Controls the amount of virtual monitors provided to the virtual machine."));
    783     m_pLabelScaleFactor->setText(tr("Scale &Factor:"));
    784779    m_pEditorScaleFactor->setToolTip(tr("Controls the guest screen scale factor."));
    785780    m_pLabelGraphicsController->setText(tr("&Graphics Controller:"));
     
    867862    iMinimumLayoutHint = qMax(iMinimumLayoutHint, m_pEditorVideoMemorySize->minimumLabelHorizontalHint());
    868863    iMinimumLayoutHint = qMax(iMinimumLayoutHint, m_pLabelMonitorCount->minimumSizeHint().width());
    869     iMinimumLayoutHint = qMax(iMinimumLayoutHint, m_pLabelScaleFactor->minimumSizeHint().width());
     864    iMinimumLayoutHint = qMax(iMinimumLayoutHint, m_pEditorScaleFactor->minimumLabelHorizontalHint());
    870865    iMinimumLayoutHint = qMax(iMinimumLayoutHint, m_pLabelGraphicsController->minimumSizeHint().width());
    871866    iMinimumLayoutHint = qMax(iMinimumLayoutHint, m_pLabelAcceleration->minimumSizeHint().width());
    872867    m_pEditorVideoMemorySize->setMinimumLayoutIndent(iMinimumLayoutHint);
     868    m_pEditorScaleFactor->setMinimumLayoutIndent(iMinimumLayoutHint);
    873869    m_pLayoutScreen->setColumnMinimumWidth(0, iMinimumLayoutHint);
    874870
     
    11801176            }
    11811177
    1182             /* Prepare scale factor label: */
    1183             m_pLabelScaleFactor = new QLabel(m_pTabScreen);
    1184             if (m_pLabelScaleFactor)
    1185             {
    1186                 m_pLabelScaleFactor->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
    1187                 m_pLayoutScreen->addWidget(m_pLabelScaleFactor, 3, 0);
    1188             }
    11891178            /* Prepare scale factor editor: */
    11901179            m_pEditorScaleFactor = new UIScaleFactorEditor(m_pTabScreen);
    11911180            if (m_pEditorScaleFactor)
    1192             {
    1193                 if (m_pLabelScaleFactor)
    1194                     m_pLabelScaleFactor->setBuddy(m_pEditorScaleFactor->focusProxy());
    1195                 m_pLayoutScreen->addWidget(m_pEditorScaleFactor, 3, 1, 2, 2);
    1196             }
     1181                m_pLayoutScreen->addWidget(m_pEditorScaleFactor, 3, 0, 1, 3);
    11971182
    11981183            /* Prepare graphics controller label: */
     
    12011186            {
    12021187                m_pLabelGraphicsController->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
    1203                 m_pLayoutScreen->addWidget(m_pLabelGraphicsController, 5, 0);
     1188                m_pLayoutScreen->addWidget(m_pLabelGraphicsController, 4, 0);
    12041189            }
    12051190            /* Prepare graphics controller editor: */
     
    12091194                if (m_pLabelGraphicsController)
    12101195                    m_pLabelGraphicsController->setBuddy(m_pEditorGraphicsController);
    1211                 m_pLayoutScreen->addWidget(m_pEditorGraphicsController, 5, 1, 1, 2);
     1196                m_pLayoutScreen->addWidget(m_pEditorGraphicsController, 4, 1, 1, 2);
    12121197            }
    12131198
     
    12171202            {
    12181203                m_pLabelAcceleration->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
    1219                 m_pLayoutScreen->addWidget(m_pLabelAcceleration, 6, 0);
     1204                m_pLayoutScreen->addWidget(m_pLabelAcceleration, 5, 0);
    12201205            }
    12211206            /* Prepare 3D checkbox: */
    12221207            m_pCheckbox3D = new QCheckBox(m_pTabScreen);
    12231208            if (m_pCheckbox3D)
    1224                 m_pLayoutScreen->addWidget(m_pCheckbox3D, 6, 1);
     1209                m_pLayoutScreen->addWidget(m_pCheckbox3D, 5, 1);
    12251210        }
    12261211
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.h

    r94341 r94357  
    213213        /** Holds the monitor count max label instance. */
    214214        QLabel                     *m_pLabelMonitorCountMax;
    215         /** Holds the scale factor label instance. */
    216         QLabel                     *m_pLabelScaleFactor;
    217215        /** Holds the scale factor editor instance. */
    218216        UIScaleFactorEditor        *m_pEditorScaleFactor;
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