npapi-vlc | branch: master | Felix Paul Kühne <[email protected]> | Wed Jan 2 12:35:53 2013 +0100| [e8cc5398617909a566b0e8a22473577c1a1830bf] | committer: Felix Paul Kühne
windowed mac plugin: improve toolbar layout > http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=e8cc5398617909a566b0e8a22473577c1a1830bf --- npapi/vlcplugin_mac.mm | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/npapi/vlcplugin_mac.mm b/npapi/vlcplugin_mac.mm index 390aa62..b4b28d9 100644 --- a/npapi/vlcplugin_mac.mm +++ b/npapi/vlcplugin_mac.mm @@ -46,6 +46,7 @@ CGImageRef _knob; } +- (BOOL)_isPlaying; @end @@ -319,9 +320,16 @@ static CGImageRef createImageNamed(NSString *name) [super dealloc]; } +- (BOOL)_isPlaying { + return YES; +} + +#pragma mark - +#pragma mark drawing + - (CGRect)_playPauseButtonRect { - return CGRectMake(0, 0, 25, 25); + return CGRectMake(4, (25 - CGImageGetHeight(_playImage)) / 2, CGImageGetWidth(_playImage), CGImageGetHeight(_playImage)); } - (CGRect)_sliderRect @@ -329,8 +337,8 @@ static CGImageRef createImageNamed(NSString *name) CGFloat sliderYPosition = (self.bounds.size.height - CGImageGetHeight(_sliderTrackLeft)) / 2.0; CGFloat playPauseButtonWidth = [self _playPauseButtonRect].size.width; - return CGRectMake(playPauseButtonWidth, sliderYPosition, - self.bounds.size.width - playPauseButtonWidth - 7, CGImageGetHeight(_sliderTrackLeft)); + return CGRectMake(playPauseButtonWidth + 7, sliderYPosition, + self.bounds.size.width - playPauseButtonWidth - 10, CGImageGetHeight(_sliderTrackLeft)); } - (CGRect)_sliderThumbRect @@ -343,7 +351,7 @@ static CGImageRef createImageNamed(NSString *name) CGFloat x = fraction * (CGRectGetWidth(sliderRect) - CGImageGetWidth(_knob)); - return CGRectMake(CGRectGetMinX(sliderRect) + x, CGRectGetMinY(sliderRect) - 1, + return CGRectMake(CGRectGetMinX(sliderRect) + x, CGRectGetMinY(sliderRect) + 1, CGImageGetWidth(_knob), CGImageGetHeight(_knob)); } _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
