mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-16 11:20:18 +00:00
Video avatar fixes
This commit is contained in:
parent
dcf1217fbf
commit
505746cc0f
@ -1678,7 +1678,7 @@
|
|||||||
_landscapeToolbarView.frame = CGRectMake(_landscapeToolbarView.frame.origin.x, screenEdges.top, TGPhotoEditorToolbarSize, self.frame.size.height);
|
_landscapeToolbarView.frame = CGRectMake(_landscapeToolbarView.frame.origin.x, screenEdges.top, TGPhotoEditorToolbarSize, self.frame.size.height);
|
||||||
|
|
||||||
CGFloat topInset = _safeAreaInset.top > FLT_EPSILON ? _safeAreaInset.top - 14.0 : 0.0f;
|
CGFloat topInset = _safeAreaInset.top > FLT_EPSILON ? _safeAreaInset.top - 14.0 : 0.0f;
|
||||||
_headerWrapperView.frame = CGRectMake(screenEdges.left, screenEdges.top + topInset, self.frame.size.width, 44);
|
_headerWrapperView.frame = CGRectMake(screenEdges.left, screenEdges.top + topInset, self.frame.size.width, 64);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -468,7 +468,7 @@ typedef enum
|
|||||||
|
|
||||||
- (void)setDotVideoView:(UIView *)dotVideoView {
|
- (void)setDotVideoView:(UIView *)dotVideoView {
|
||||||
_dotVideoView = dotVideoView;
|
_dotVideoView = dotVideoView;
|
||||||
_dotVideoView.frame = _dotImageView.bounds;
|
_dotVideoView.frame = _dotImageView.frame;
|
||||||
[_dotContentView addSubview:_dotVideoView];
|
[_dotContentView addSubview:_dotVideoView];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -690,7 +690,7 @@ typedef enum
|
|||||||
|
|
||||||
if (_hasDotPicker) {
|
if (_hasDotPicker) {
|
||||||
CGSize videoSize = TGFillSize([self _thumbnailSize], _dotImageView.frame.size);
|
CGSize videoSize = TGFillSize([self _thumbnailSize], _dotImageView.frame.size);
|
||||||
_dotImageView.frame = CGRectMake(TGScreenPixelFloor((_dotImageView.frame.size.width - videoSize.width) / 2.0), 0.0, videoSize.width, videoSize.height);
|
_dotImageView.frame = CGRectMake(TGScreenPixelFloor((_dotContentView.frame.size.width - videoSize.width) / 2.0), 0.0, videoSize.width, videoSize.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
NSInteger thumbnailCount = (NSInteger)CGCeil(_summaryThumbnailWrapperView.frame.size.width / [self _thumbnailSizeWithAspectRatio:frameAspectRatio orientation:_cropOrientation].width);
|
NSInteger thumbnailCount = (NSInteger)CGCeil(_summaryThumbnailWrapperView.frame.size.width / [self _thumbnailSizeWithAspectRatio:frameAspectRatio orientation:_cropOrientation].width);
|
||||||
@ -752,7 +752,7 @@ typedef enum
|
|||||||
|
|
||||||
if (!reset && _summaryThumbnailViews.count > 0 && _summaryThumbnailSnapshotView == nil)
|
if (!reset && _summaryThumbnailViews.count > 0 && _summaryThumbnailSnapshotView == nil)
|
||||||
{
|
{
|
||||||
_summaryThumbnailSnapshotView = [_summaryThumbnailWrapperView snapshotViewAfterScreenUpdates:false];
|
_summaryThumbnailSnapshotView = [_summaryThumbnailWrapperView snapshotViewAfterScreenUpdates:true];
|
||||||
_summaryThumbnailSnapshotView.frame = _summaryThumbnailWrapperView.frame;
|
_summaryThumbnailSnapshotView.frame = _summaryThumbnailWrapperView.frame;
|
||||||
[_summaryThumbnailWrapperView.superview insertSubview:_summaryThumbnailSnapshotView aboveSubview:_summaryThumbnailWrapperView];
|
[_summaryThumbnailWrapperView.superview insertSubview:_summaryThumbnailSnapshotView aboveSubview:_summaryThumbnailWrapperView];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -138,10 +138,15 @@ const CGFloat TGPhotoAvatarPreviewLandscapePanelSize = TGPhotoAvatarPreviewPanel
|
|||||||
|
|
||||||
- (void)transitionIn
|
- (void)transitionIn
|
||||||
{
|
{
|
||||||
|
_scrubberView.layer.rasterizationScale = [UIScreen mainScreen].scale;
|
||||||
|
_scrubberView.layer.shouldRasterize = true;
|
||||||
|
|
||||||
[UIView animateWithDuration:0.3f animations:^
|
[UIView animateWithDuration:0.3f animations:^
|
||||||
{
|
{
|
||||||
_portraitToolsWrapperView.alpha = 1.0f;
|
_portraitToolsWrapperView.alpha = 1.0f;
|
||||||
_landscapeToolsWrapperView.alpha = 1.0f;
|
_landscapeToolsWrapperView.alpha = 1.0f;
|
||||||
|
} completion:^(BOOL finished) {
|
||||||
|
_scrubberView.layer.shouldRasterize = false;
|
||||||
}];
|
}];
|
||||||
|
|
||||||
switch (self.effectiveOrientation)
|
switch (self.effectiveOrientation)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user