VirtualBox

Ignore:
Timestamp:
Jun 11, 2018 11:24:57 AM (7 years ago)
Author:
vboxsync
Message:

FE/Qt Make sure ram slider and ram spin box has same minimum and maximum in new vm wizards

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIGuestRAMSlider.cpp

    r71943 r72502  
    158158    setTickInterval(pageStep());
    159159    /* Setup the scale so that ticks are at page step boundaries */
    160     setMinimum((m_uMinRAM / pageStep()) * pageStep());
     160    if (m_uMinRAM >= static_cast<uint>(pageStep()))
     161        setMinimum((m_uMinRAM / pageStep()) * pageStep());
     162    else
     163        setMinimum(m_uMinRAM);
     164
    161165    setMaximum(m_uMaxRAM);
    162166    setSnappingEnabled(true);
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic2.cpp

    r71943 r72502  
    7373            m_pRamEditor = new QSpinBox(this);
    7474            {
    75                 m_pRamEditor->setMinimum(m_pRamSlider->minRAM());
    76                 m_pRamEditor->setMaximum(m_pRamSlider->maxRAM());
     75                m_pRamEditor->setMinimum(m_pRamSlider->minimum());
     76                m_pRamEditor->setMaximum(m_pRamSlider->maximum());
    7777                vboxGlobal().setMinimumWidthAccordingSymbolCount(m_pRamEditor, 5);
    7878            }
     
    166166           m_pRamSlider->value() <= (int)m_pRamSlider->maxRAM();
    167167}
    168 
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp

    r72321 r72502  
    7171                m_pRamEditor = new QSpinBox(m_pMemoryCnt);
    7272                {
    73                     m_pRamEditor->setMinimum(m_pRamSlider->minRAM());
    74                     m_pRamEditor->setMaximum(m_pRamSlider->maxRAM());
     73                    m_pRamEditor->setMinimum(m_pRamSlider->minimum());
     74                    m_pRamEditor->setMaximum(m_pRamSlider->maximum());
    7575                    vboxGlobal().setMinimumWidthAccordingSymbolCount(m_pRamEditor, 5);
    7676                }
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