Profile preview

This commit is contained in:
Isaac
2024-04-02 16:28:01 +04:00
parent db60f2c82d
commit baca7c8661
19 changed files with 870 additions and 117 deletions

View File

@@ -42,6 +42,7 @@ const CGFloat TGPhotoEditorSliderViewInternalMargin = 7.0f;
_value = _startValue;
_dotSize = 10.5f;
_minimumUndottedValue = -1;
_markPositions = true;
_lineSize = TGPhotoEditorSliderViewLineSize;
_knobPadding = TGPhotoEditorSliderViewInternalMargin;
@@ -214,6 +215,12 @@ const CGFloat TGPhotoEditorSliderViewInternalMargin = 7.0f;
{
for (NSInteger i = 0; i < self.positionsCount; i++)
{
if (!self.markPositions) {
if (i != 0 && i != self.positionsCount - 1) {
continue;
}
}
if (self.useLinesForPositions) {
CGSize lineSize = CGSizeMake(4.0, 12.0);
CGRect lineRect = CGRectMake(margin - lineSize.width / 2.0f + totalLength / (self.positionsCount - 1) * i, (sideLength - lineSize.height) / 2, lineSize.width, lineSize.height);