mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Video avatar fixes
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#import "TGPhotoEditorInterfaceAssets.h"
|
||||
|
||||
#import "PGPhotoEditorView.h"
|
||||
#import "TGPhotoEntitiesContainerView.h"
|
||||
|
||||
const CGFloat TGPhotoAvatarCropViewOverscreenSize = 1000;
|
||||
const CGFloat TGPhotoAvatarCropViewCurtainSize = 300;
|
||||
@@ -43,12 +44,13 @@ const CGFloat TGPhotoAvatarCropViewCurtainMargin = 200;
|
||||
|
||||
__weak PGPhotoEditorView *_fullPreviewView;
|
||||
__weak UIImageView *_fullPaintingView;
|
||||
__weak TGPhotoEntitiesContainerView *_fullEntitiesView;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation TGPhotoAvatarCropView
|
||||
|
||||
- (instancetype)initWithOriginalSize:(CGSize)originalSize screenSize:(CGSize)screenSize fullPreviewView:(PGPhotoEditorView *)fullPreviewView fullPaintingView:(UIImageView *)fullPaintingView
|
||||
- (instancetype)initWithOriginalSize:(CGSize)originalSize screenSize:(CGSize)screenSize fullPreviewView:(PGPhotoEditorView *)fullPreviewView fullPaintingView:(UIImageView *)fullPaintingView fullEntitiesView:(TGPhotoEntitiesContainerView *)fullEntitiesView
|
||||
{
|
||||
self = [super initWithFrame:CGRectZero];
|
||||
if (self != nil)
|
||||
@@ -83,12 +85,16 @@ const CGFloat TGPhotoAvatarCropViewCurtainMargin = 200;
|
||||
CGFloat scale = _imageView.bounds.size.width / fittedSize.width;
|
||||
_fullPreviewView.transform = CGAffineTransformMakeScale(self.cropMirrored ? -scale : scale, scale);
|
||||
_fullPreviewView.userInteractionEnabled = false;
|
||||
[_wrapperView addSubview:_fullPreviewView];
|
||||
|
||||
_fullPaintingView = fullPaintingView;
|
||||
_fullPaintingView.frame = _fullPreviewView.frame;
|
||||
[_wrapperView addSubview:_fullPreviewView];
|
||||
[_wrapperView addSubview:_fullPaintingView];
|
||||
|
||||
_fullEntitiesView = fullEntitiesView;
|
||||
_fullEntitiesView.frame = _fullPreviewView.frame;
|
||||
[_wrapperView addSubview:_fullEntitiesView];
|
||||
|
||||
_flashView = [[UIView alloc] init];
|
||||
_flashView.alpha = 0.0;
|
||||
_flashView.backgroundColor = [UIColor whiteColor];
|
||||
|
||||
Reference in New Issue
Block a user