629
586
[[VLCCoreInteraction sharedInstance] setVolume: [sender intValue]];
632
#define addImage(image, _x, _y, mode, _width) \
633
img = [NSImage imageNamed:image]; \
634
image_rect.size = [img size]; \
589
#define addImage(image, _x, _y, mode) \
590
image_size = [image size]; \
591
image_rect.size = image_size; \
635
592
image_rect.origin.x = 0; \
636
593
image_rect.origin.y = 0; \
637
594
frame.origin.x = _x; \
638
595
frame.origin.y = _y; \
639
frame.size = [img size]; \
640
if( _width ) frame.size.width = _width; \
641
[img drawInRect:frame fromRect:image_rect operation:mode fraction:1];
596
frame.size = image_size; \
597
[image drawInRect:frame fromRect:image_rect operation:mode fraction:1];
643
599
- (void)drawRect:(NSRect)rect
645
601
NSRect frame = [self frame];
646
602
NSRect image_rect;
648
if (b_usingBigScreen)
650
addImage( @"fs_background@x1.5", 0, 0, NSCompositeCopy, 0 );
651
addImage( @"fs_volume_slider_bar@x1.5", 39, 35.5, NSCompositeSourceOver, 0 );
652
addImage( @"fs_volume_mute@x1.5", 24, 27, NSCompositeSourceOver, 0 );
653
addImage( @"fs_volume_max@x1.5", 186, 27, NSCompositeSourceOver, 0 );
654
addImage( @"fs_time_slider@x1.5", 22.5, 79.5, NSCompositeSourceOver, 0);
658
addImage( @"fs_background", 0, 0, NSCompositeCopy, 0 );
659
addImage( @"fs_volume_slider_bar", 26, 23, NSCompositeSourceOver, 0 );
660
addImage( @"fs_volume_mute", 16, 18, NSCompositeSourceOver, 0 );
661
addImage( @"fs_volume_max", 124, 18, NSCompositeSourceOver, 0 );
662
addImage( @"fs_time_slider", 15, 53, NSCompositeSourceOver, 0);
666
- (void)adaptViewSizeToScreen:(BOOL)b_value
668
b_usingBigScreen = b_value;
670
if (b_usingBigScreen)
672
restyleButton( o_prev, @"fs_skip_previous@x1.5", @"fs_skip_previous_highlight@x1.5", 261, 22.5 );
673
restyleButton( o_bwd, @"fs_rewind@x1.5", @"fs_rewind_highlight@x1.5", 316.5, 21 );
674
restyleButton( o_play, @"fs_play@x1.5", @"fs_play_highlight@x1.5", 400.5, 15 );
675
restyleButton( o_fwd, @"fs_forward@x1.5", @"fs_forward_highlight@x1.5", 469.5, 21 );
676
restyleButton( o_next, @"fs_skip_next@x1.5", @"fs_skip_next_highlight@x1.5", 547.5, 22.5 );
677
restyleButton( o_fullscreen, @"fs_exit_fullscreen@x1.5", @"fs_exit_fullscreen_hightlight@x1.5", 765.5, 19.5 );
678
restyleTextfieldOrSlider( o_streamTitle_txt, 148, 96, 528, 21 );
679
[o_streamTitle_txt setFont:[NSFont systemFontOfSize:[NSFont systemFontSize]]];
680
restyleTextfieldOrSlider( o_streamPosition_txt, 718, 96, 82.5, 21 );
681
[o_streamPosition_txt setFont:[NSFont systemFontOfSize:[NSFont systemFontSize]]];
682
restyleTextfieldOrSlider( o_fs_timeSlider, 22.5, 82.5, 777, 13.5 );
683
restyleTextfieldOrSlider( o_fs_volumeSlider, 39, 32, 142.5, 15);
687
restyleButton( o_prev, @"fs_skip_previous", @"fs_skip_previous_highlight", 174, 15 );
688
restyleButton( o_bwd, @"fs_rewind", @"fs_rewind_highlight", 211, 14 );
689
restyleButton( o_play, @"fs_play", @"fs_play_highlight", 267, 10 );
690
restyleButton( o_fwd, @"fs_forward", @"fs_forward_highlight", 313, 14 );
691
restyleButton( o_next, @"fs_skip_next", @"fs_skip_next_highlight", 365, 15 );
692
restyleButton( o_fullscreen, @"fs_exit_fullscreen", @"fs_exit_fullscreen_hightlight", 507, 13 );
693
restyleTextfieldOrSlider( o_streamTitle_txt, 98, 64, 352, 14 );
694
[o_streamTitle_txt setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
695
restyleTextfieldOrSlider( o_streamPosition_txt, 471, 64, 65, 14);
696
[o_streamPosition_txt setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
697
restyleTextfieldOrSlider( o_fs_timeSlider, 15, 55, 518, 9 );
698
restyleTextfieldOrSlider( o_fs_volumeSlider, 26, 20, 95, 10);
605
addImage( o_background_img, 0, 0, NSCompositeCopy );
606
addImage( o_vol_sld_img, 26, 23, NSCompositeSourceOver );
607
addImage( o_vol_mute_img, 16, 18, NSCompositeSourceOver );
608
addImage( o_vol_max_img, 124, 18, NSCompositeSourceOver );
609
addImage( o_time_sld_img, 15, 53, NSCompositeSourceOver );