using fuzzy compares for bounded values
This commit is contained in:
parent
1f8ec04bde
commit
293055ac06
@ -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() );
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user