mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Various fixes
This commit is contained in:
@@ -67,13 +67,12 @@ NSString *const TGMediaAssetsVideoCellKind = @"TGMediaAssetsVideoCellKind";
|
||||
|
||||
_iconView = [[UIImageView alloc] init];
|
||||
_iconView.contentMode = UIViewContentModeCenter;
|
||||
[self addSubview:_iconView];
|
||||
|
||||
_durationLabel = [[UILabel alloc] init];
|
||||
_durationLabel.textColor = [UIColor whiteColor];
|
||||
_durationLabel.backgroundColor = [UIColor clearColor];
|
||||
_durationLabel.textAlignment = NSTextAlignmentRight;
|
||||
_durationLabel.font = TGSystemFontOfSize(12.0f);
|
||||
_durationLabel.font = TGBoldSystemFontOfSize(13);
|
||||
[_durationLabel sizeToFit];
|
||||
[self addSubview:_durationLabel];
|
||||
|
||||
@@ -113,6 +112,7 @@ NSString *const TGMediaAssetsVideoCellKind = @"TGMediaAssetsVideoCellKind";
|
||||
durationString = [NSString stringWithFormat:@"%d:%02d", duration / 60, duration % 60];
|
||||
|
||||
_durationLabel.text = durationString;
|
||||
[_durationLabel sizeToFit];
|
||||
|
||||
if (asset.subtypes & TGMediaAssetSubtypeVideoTimelapse)
|
||||
_iconView.image = TGComponentsImageNamed(@"ModernMediaItemTimelapseIcon");
|
||||
@@ -235,7 +235,9 @@ NSString *const TGMediaAssetsVideoCellKind = @"TGMediaAssetsVideoCellKind";
|
||||
self.checkButton.frame = (CGRect){ { self.frame.size.width - self.checkButton.frame.size.width - 2, 2 }, self.checkButton.frame.size };
|
||||
_shadowView.frame = (CGRect){ { 0, self.frame.size.height - _shadowView.frame.size.height }, {self.frame.size.width, _shadowView.frame.size.height } };
|
||||
_iconView.frame = CGRectMake(0, self.frame.size.height - 19, 19, 19);
|
||||
_durationLabel.frame = (CGRect){ { 5, _shadowView.frame.origin.y }, {self.frame.size.width - 5 - 4, _shadowView.frame.size.height } };
|
||||
|
||||
CGSize durationSize = _durationLabel.frame.size;
|
||||
_durationLabel.frame = CGRectMake(self.frame.size.width - floor(durationSize.width) - 5.0, self.frame.size.height - floor(durationSize.height) - 4.0, durationSize.width, durationSize.height);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user