mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-21 21:55:38 +00:00
Fixed incorrect knob position for SliderComponent for non-zero minimum values.
This commit is contained in:
parent
bd57d23bce
commit
d45e72e10c
1
NEWS.md
1
NEWS.md
|
@ -77,4 +77,5 @@ Many bugs have been fixed, and numerous features that were only partially implem
|
|||
* Hidden files still showed up if they had a gamelist.xml entry
|
||||
* On Unix, adding a hidden folder with a game in it crashed the application on startup
|
||||
* If the user tried to enter a blank game name in the metadata editor, the application would crash upon saving
|
||||
* The SliderComponent knob position was set incorrectly if the minimum value was not zero
|
||||
* Lots and lots of additional small bugs and inconsistencies fixed
|
||||
|
|
|
@ -147,7 +147,7 @@ void SliderComponent::onValueChanged()
|
|||
mKnob.setResize(0, mSize.y() * 0.7f);
|
||||
float lineLength = mSize.x() - mKnob.getSize().x() -
|
||||
(mValueCache ? mValueCache->metrics.size.x() + 4 : 0);
|
||||
mKnob.setPosition(((mValue + mMin) / mMax) * lineLength +
|
||||
mKnob.setPosition((mValue / mMax) * lineLength +
|
||||
mKnob.getSize().x()/2, mSize.y() / 2);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue