Various Improvements

This commit is contained in:
Ilya Laktyushin
2022-04-23 05:28:29 +04:00
parent e3dc5cbe8a
commit 71bde57b6a
90 changed files with 1757 additions and 297 deletions

View File

@@ -412,9 +412,13 @@ NSString * const TGPhotoCropOriginalAspectRatio = @"original";
if (saving)
{
CGFloat containerHeight = self.view.frame.size.height;
if (_forVideo && self.view.frame.size.width < self.view.frame.size.height) {
containerHeight -= 44.0;
}
CGSize fittedSize = TGScaleToSize(snapshotView.frame.size, self.view.frame.size);
targetFrame = CGRectMake((self.view.frame.size.width - fittedSize.width) / 2,
(self.view.frame.size.height - fittedSize.height) / 2,
(containerHeight - fittedSize.height) / 2,
fittedSize.width,
fittedSize.height);