Changeset 23025 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Sep 15, 2009 9:38:15 AM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/QIAdvancedSlider.cpp
r22865 r23025 79 79 } 80 80 #endif /* Q_WS_MAC */ 81 if (mMinOpt != -1 && 82 mMaxOpt != -1) 81 if ((mMinOpt != -1 && 82 mMaxOpt != -1) && 83 mMinOpt != mMaxOpt) 83 84 { 84 85 int posMinOpt = QStyle::sliderPositionFromValue (opt.minimum, opt.maximum, mMinOpt, available); … … 86 87 p.fillRect (ticks.x() + posMinOpt, ticks.y(), posMaxOpt - posMinOpt + 1, ticks.height(), mOptColor); 87 88 } 88 if (mMinWrn != -1 && 89 mMaxWrn != -1) 89 if ((mMinWrn != -1 && 90 mMaxWrn != -1) && 91 mMinWrn != mMaxWrn) 90 92 { 91 93 int posMinWrn = QStyle::sliderPositionFromValue (opt.minimum, opt.maximum, mMinWrn, available); … … 93 95 p.fillRect (ticks.x() + posMinWrn, ticks.y(), posMaxWrn - posMinWrn + 1, ticks.height(), mWrnColor); 94 96 } 95 if (mMinErr != -1 && 96 mMaxErr != -1) 97 if ((mMinErr != -1 && 98 mMaxErr != -1) && 99 mMinErr != mMaxErr) 97 100 { 98 101 int posMinErr = QStyle::sliderPositionFromValue (opt.minimum, opt.maximum, mMinErr, available); -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxGuestRAMSlider.cpp
r21347 r23025 142 142 mMaxRAMOpt = (uint)(0.90 * fullSize); 143 143 } 144 /* Now check the calculated maximums are out of the range for the guest 145 * RAM. If so change it accordingly. */ 146 mMaxRAMAlw = RT_MIN (mMaxRAMAlw, mMaxRAM); 147 mMaxRAMOpt = RT_MIN (mMaxRAMOpt, mMaxRAM); 144 148 145 149 setPageStep (calcPageStep (mMaxRAM));
Note:
See TracChangeset
for help on using the changeset viewer.