This commit is contained in:
halx99 2021-11-11 18:33:29 +08:00
parent 31ed6d97a9
commit 0016ea2b62
1 changed files with 2 additions and 2 deletions

View File

@ -79,8 +79,8 @@ void GSlider::setWholeNumbers(bool value)
void GSlider::update()
{
double percent = MIN(_value / _max, 1);
updateWithPercent(static_cast<float>(percent), false);
float percent = MIN((_value - _min) / (_max - _min), 1);
updateWithPercent(percent, false);
}
void GSlider::updateWithPercent(float percent, bool manual)