using fuzzy compares for bounded values

This commit is contained in:
Uwe Rathmann 2021-04-19 09:30:29 +02:00
parent 1f8ec04bde
commit 293055ac06

View File

@ -132,6 +132,12 @@ void QskBoundedControl::componentComplete()
qreal QskBoundedControl::boundedValue( qreal value ) const
{
if ( qskFuzzyCompare( value, minimum() ) )
return minimum();
if ( qskFuzzyCompare( value, maximum() ) )
return maximum();
return qBound( minimum(), value, maximum() );
}