mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-17 11:50:56 +00:00
minor fixis
This commit is contained in:
parent
e30584d215
commit
f30bf32a47
@ -58,6 +58,8 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext;
|
|||||||
BOOL _muted;
|
BOOL _muted;
|
||||||
int32_t _periodicTimeObserverTimescale;
|
int32_t _periodicTimeObserverTimescale;
|
||||||
NSString *_gravity;
|
NSString *_gravity;
|
||||||
|
|
||||||
|
UIColor *_defaultControlsColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
@ -105,6 +107,7 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext;
|
|||||||
- (void)privateInit
|
- (void)privateInit
|
||||||
{
|
{
|
||||||
|
|
||||||
|
_defaultControlsColor = [UIColor whiteColor];
|
||||||
_cachedControls = [[NSMutableDictionary alloc] init];
|
_cachedControls = [[NSMutableDictionary alloc] init];
|
||||||
|
|
||||||
_videoNode = [[ASVideoNode alloc] init];
|
_videoNode = [[ASVideoNode alloc] init];
|
||||||
@ -220,7 +223,7 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext;
|
|||||||
if (_delegateFlags.delegatePlaybackButtonTint) {
|
if (_delegateFlags.delegatePlaybackButtonTint) {
|
||||||
_playbackButtonNode.tintColor = [_delegate videoPlayerNodePlaybackButtonTint:self];
|
_playbackButtonNode.tintColor = [_delegate videoPlayerNodePlaybackButtonTint:self];
|
||||||
} else {
|
} else {
|
||||||
_playbackButtonNode.tintColor = [UIColor whiteColor];
|
_playbackButtonNode.tintColor = _defaultControlsColor;
|
||||||
}
|
}
|
||||||
[_playbackButtonNode addTarget:self action:@selector(playbackButtonTapped:) forControlEvents:ASControlNodeEventTouchUpInside];
|
[_playbackButtonNode addTarget:self action:@selector(playbackButtonTapped:) forControlEvents:ASControlNodeEventTouchUpInside];
|
||||||
[_cachedControls setObject:_playbackButtonNode forKey:@(ASVideoPlayerNodeControlTypePlaybackButton)];
|
[_cachedControls setObject:_playbackButtonNode forKey:@(ASVideoPlayerNodeControlTypePlaybackButton)];
|
||||||
@ -322,7 +325,7 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext;
|
|||||||
} else {
|
} else {
|
||||||
options = @{
|
options = @{
|
||||||
NSFontAttributeName : [UIFont systemFontOfSize:12.0],
|
NSFontAttributeName : [UIFont systemFontOfSize:12.0],
|
||||||
NSForegroundColorAttributeName: [UIColor whiteColor]
|
NSForegroundColorAttributeName: _defaultControlsColor
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -38,9 +38,9 @@
|
|||||||
- (nullable id<NSObject>)drawParametersForAsyncLayer:(_ASDisplayLayer *)layer
|
- (nullable id<NSObject>)drawParametersForAsyncLayer:(_ASDisplayLayer *)layer
|
||||||
{
|
{
|
||||||
return @{
|
return @{
|
||||||
@"buttonType" : [NSNumber numberWithInt:_buttonType],
|
@"buttonType" : [NSNumber numberWithInt:_buttonType],
|
||||||
@"color" : self.tintColor
|
@"color" : self.tintColor
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (void)drawRect:(CGRect)bounds withParameters:(id<NSObject>)parameters isCancelled:(asdisplaynode_iscancelled_block_t)isCancelledBlock isRasterizing:(BOOL)isRasterizing
|
+ (void)drawRect:(CGRect)bounds withParameters:(id<NSObject>)parameters isCancelled:(asdisplaynode_iscancelled_block_t)isCancelledBlock isRasterizing:(BOOL)isRasterizing
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user