Various Improvements

This commit is contained in:
Ilya Laktyushin
2021-07-14 01:07:09 +03:00
parent a260717c88
commit 8d58a2b239
20 changed files with 513 additions and 167 deletions

View File

@@ -1414,7 +1414,7 @@ const CGFloat TGPhotoPaintStickerKeyboardSize = 260.0f;
- (CGFloat)_brushWeightForSize:(CGFloat)size
{
return [self _brushBaseWeightForCurrentPainting] + [self _brushWeightRangeForCurrentPainting] * size;
return ([self _brushBaseWeightForCurrentPainting] + [self _brushWeightRangeForCurrentPainting] * size) / _scrollView.zoomScale;
}
+ (CGSize)maximumPaintingSize
@@ -1739,6 +1739,9 @@ const CGFloat TGPhotoPaintStickerKeyboardSize = 260.0f;
{
[self adjustZoom];
TGPaintSwatch *currentSwatch = _portraitSettingsView.swatch;
[_canvasView setBrushWeight:[self _brushWeightForSize:currentSwatch.brushWeight]];
if (_scrollView.zoomScale < _scrollView.normalZoomScale - FLT_EPSILON)
{
[TGHacks setAnimationDurationFactor:0.5f];