Various fixes

This commit is contained in:
Ilya Laktyushin
2024-12-12 20:41:33 +04:00
parent 9e908c9ea7
commit ad9f0d6847
14 changed files with 214 additions and 31 deletions

View File

@@ -381,7 +381,11 @@ const CGFloat TGPhotoEditorSliderViewInternalMargin = 7.0f;
- (void)setValue:(CGFloat)value animated:(BOOL)__unused animated
{
_value = MIN(MAX(_lowerBoundValue, MAX(value, _minimumValue)), _maximumValue);
if (_lowerBoundValue > FLT_EPSILON) {
_value = MIN(MAX(_lowerBoundValue, MAX(value, _minimumValue)), _maximumValue);
} else {
_value = MIN(MAX(value, _minimumValue), _maximumValue);
}
[self setNeedsLayout];
}