1 /*****************************************************************************
2 * fspanel.m: MacOS X full screen panel
3 *****************************************************************************
4 * Copyright (C) 2006-2011 VLC authors and VideoLAN
7 * Authors: Jérôme Decoodt <djc at videolan dot org>
8 * Felix Paul Kühne <fkuehne at videolan dot org>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23 *****************************************************************************/
25 /*****************************************************************************
27 *****************************************************************************/
29 #import "CoreInteraction.h"
30 #import "MainWindow.h"
33 #import "CompatibilityFixes.h"
35 @interface VLCFSPanel ()
39 /*****************************************************************************
41 *****************************************************************************/
42 @implementation VLCFSPanel
43 /* We override this initializer so we can set the NSBorderlessWindowMask styleMask, and set a few other important settings */
44 - (id)initWithContentRect:(NSRect)contentRect
45 styleMask:(NSUInteger)aStyle
46 backing:(NSBackingStoreType)bufferingType
49 id win = [super initWithContentRect:contentRect styleMask:NSTexturedBackgroundWindowMask backing:bufferingType defer:flag];
51 [win setHasShadow: NO];
52 [win setBackgroundColor:[NSColor clearColor]];
54 [win setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
56 /* let the window sit on top of everything else and start out completely transparent */
57 [win setLevel:NSModalPanelWindowLevel];
59 hideAgainTimer = fadeTimer = nil;
60 [self setNonActive:nil];
66 [self setContentView:[[VLCFSPanelView alloc] initWithFrame: [self frame]]];
67 BOOL isInside = (NSPointInRect([NSEvent mouseLocation],[self frame]));
68 [[self contentView] addTrackingRect:[[self contentView] bounds] owner:self userData:nil assumeInside:isInside];
70 [self mouseEntered:NULL];
72 [self mouseExited:NULL];
76 /* get a notification if VLC isn't the active app anymore */
77 [[NSNotificationCenter defaultCenter]
79 selector: @selector(setNonActive:)
80 name: NSApplicationDidResignActiveNotification
83 /* get a notification if VLC is the active app again */
84 [[NSNotificationCenter defaultCenter]
86 selector: @selector(setActive:)
87 name: NSApplicationDidBecomeActiveNotification
91 /* make sure that we don't become key, since we can't handle hotkeys */
92 - (BOOL)canBecomeKeyWindow
97 - (BOOL)mouseDownCanMoveWindow
104 [[NSNotificationCenter defaultCenter] removeObserver: self];
108 [hideAgainTimer invalidate];
109 [hideAgainTimer release];
111 [self setFadeTimer:nil];
117 /* centre the panel in the lower third of the screen */
118 NSPoint theCoordinate;
119 NSRect theScreensFrame;
120 NSRect theWindowsFrame;
123 /* user-defined screen */
124 screen = [NSScreen screenWithDisplayID: (CGDirectDisplayID)i_device];
128 /* invalid preferences or none specified, using main screen */
129 screen = [NSScreen mainScreen];
132 theScreensFrame = [screen frame];
133 theWindowsFrame = [self frame];
135 if( theScreensFrame.size.width >= 1920 ) // 17" MBP, 24"/27" iMacs, external displays
136 b_usingBigScreen = YES;
138 if( (b_usingBigScreen && theWindowsFrame.size.width < 820) || (!b_usingBigScreen && theWindowsFrame.size.width > 550) )
139 [self adaptWindowSizeToScreen];
141 theCoordinate.x = (theScreensFrame.size.width - theWindowsFrame.size.width) / 2 + theScreensFrame.origin.x;
142 theCoordinate.y = (theScreensFrame.size.height / 3) - theWindowsFrame.size.height + theScreensFrame.origin.y;
143 [self setFrameTopLeftPoint: theCoordinate];
148 [[self contentView] setPlay];
153 [[self contentView] setPause];
156 - (void)setStreamTitle:(NSString *)o_title
158 [[self contentView] setStreamTitle: o_title];
161 - (void)setStreamPos:(float) f_pos andTime:(NSString *)o_time
163 [[self contentView] setStreamPos:f_pos andTime: o_time];
166 - (void)setSeekable:(BOOL) b_seekable
168 [[self contentView] setSeekable: b_seekable];
171 - (void)setVolumeLevel: (float)f_volumeLevel
173 [[self contentView] setVolumeLevel: f_volumeLevel];
176 - (void)setNonActive:(id)noData
179 [self orderOut: self];
181 /* here's fadeOut, just without visibly fading */
183 [self setAlphaValue:0.0];
184 [self setFadeTimer:nil];
188 - (void)setActive:(id)noData
191 [[VLCMain sharedInstance] showFullscreenController];
194 /* This routine is called repeatedly to fade in the window */
195 - (void)focus:(NSTimer *)timer
197 /* we need to push ourselves to front if the vout window was closed since our last display */
198 if( b_voutWasUpdated )
200 [self orderFront: self];
201 b_voutWasUpdated = NO;
204 if( [self alphaValue] < 1.0 )
205 [self setAlphaValue:[self alphaValue]+0.1];
206 if( [self alphaValue] >= 1.0 )
209 [self setAlphaValue: 1.0];
210 [self setFadeTimer:nil];
214 [self setFadeTimer:[NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(unfocus:) userInfo:NULL repeats:YES]];
219 /* This routine is called repeatedly to hide the window */
220 - (void)unfocus:(NSTimer *)timer
226 [self setFadeTimer: NULL];
230 if( [self alphaValue] > 0.0 )
231 [self setAlphaValue:[self alphaValue]-0.05];
232 if( [self alphaValue] <= 0.05 )
235 [self setAlphaValue:0.0];
236 [self setFadeTimer:nil];
241 [NSTimer scheduledTimerWithTimeInterval:0.1
243 selector:@selector(focus:)
250 - (void)mouseExited:(NSEvent *)theEvent
252 /* give up our focus, so the vout may show us again without letting the user clicking it */
253 vout_thread_t *p_vout = getVout();
256 if (var_GetBool( p_vout, "fullscreen" ))
257 [[[[VLCMainWindow sharedInstance] videoView] window] makeKeyWindow];
258 vlc_object_release( p_vout );
264 [NSCursor setHiddenUntilMouseMoves: YES];
269 /* in case that the user don't want us to appear, make sure we hide the mouse */
271 if( !config_GetInt( VLCIntf, "macosx-fspanel" ) )
273 float time = (float)var_CreateGetInteger( VLCIntf, "mouse-hide-timeout" ) / 1000.;
274 [self setFadeTimer:[NSTimer scheduledTimerWithTimeInterval:time target:self selector:@selector(hideMouse) userInfo:nil repeats:NO]];
281 [self orderFront: nil];
283 if( [self alphaValue] < 1.0 || b_displayed != YES )
285 if (![self fadeTimer])
286 [self setFadeTimer:[NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(focus:) userInfo:[NSNumber numberWithShort:1] repeats:YES]];
287 else if ([[[self fadeTimer] userInfo] shortValue]==0)
295 if( NSPointInRect([NSEvent mouseLocation],[self frame]))
298 if( ( [self alphaValue] > 0.0 ) )
300 if (![self fadeTimer])
301 [self setFadeTimer:[NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(unfocus:) userInfo:[NSNumber numberWithShort:0] repeats:YES]];
302 else if ([[[self fadeTimer] userInfo] shortValue]==1)
307 /* triggers a timer to autoHide us again after some seconds of no activity */
310 /* this will tell the timer to start over again or to start at all */
313 /* get us a valid timer */
314 if(! b_alreadyCounting )
316 i_timeToKeepVisibleInSec = var_CreateGetInteger( VLCIntf, "mouse-hide-timeout" ) / 500;
319 [hideAgainTimer invalidate];
320 [hideAgainTimer autorelease];
322 /* released in -autoHide and -dealloc */
323 hideAgainTimer = [[NSTimer scheduledTimerWithTimeInterval: 0.5
325 selector: @selector(keepVisible:)
327 repeats: YES] retain];
328 b_alreadyCounting = YES;
332 - (void)keepVisible:(NSTimer *)timer
334 /* if the user triggered an action, start over again */
338 /* count down until we hide ourselfes again and do so if necessary */
339 if( --i_timeToKeepVisibleInSec < 1 )
343 [hideAgainTimer invalidate]; /* released in -autoHide and -dealloc */
344 b_alreadyCounting = NO;
348 /* A getter and setter for our main timer that handles window fading */
349 - (NSTimer *)fadeTimer
354 - (void)setFadeTimer:(NSTimer *)timer
357 [fadeTimer invalidate];
358 [fadeTimer autorelease];
362 - (void)mouseDown:(NSEvent *)theEvent
364 mouseClic = [theEvent locationInWindow];
367 - (void)mouseDragged:(NSEvent *)theEvent
369 NSPoint point = [NSEvent mouseLocation];
370 point.x -= mouseClic.x;
371 point.y -= mouseClic.y;
372 [self setFrameOrigin:point];
380 - (void)setVoutWasUpdated: (int)i_newdevice;
382 b_voutWasUpdated = YES;
383 if( i_newdevice != i_device )
385 i_device = i_newdevice;
390 - (void)adaptWindowSizeToScreen
392 NSRect theWindowsFrame = [self frame];
393 if( b_usingBigScreen )
395 theWindowsFrame.size.width = 824;
396 theWindowsFrame.size.height = 131;
400 theWindowsFrame.size.width = 549;
401 theWindowsFrame.size.height = 87;
404 [[self contentView] adaptViewSizeToScreen: b_usingBigScreen];
406 [self setFrame:theWindowsFrame display:YES animate:YES];
410 /*****************************************************************************
412 *****************************************************************************/
413 @implementation VLCFSPanelView
415 #define addButton( o_button, imageOff, imageOn, _x, _y, action ) \
416 s_rc.origin.x = _x; \
417 s_rc.origin.y = _y; \
418 o_button = [[NSButton alloc] initWithFrame: s_rc]; \
419 [o_button setButtonType: NSMomentaryChangeButton]; \
420 [o_button setBezelStyle: NSRegularSquareBezelStyle]; \
421 [o_button setBordered: NO]; \
422 [o_button setFont:[NSFont systemFontOfSize:0]]; \
423 [o_button setImage:[NSImage imageNamed:imageOff]]; \
424 [o_button setAlternateImage:[NSImage imageNamed:imageOn]]; \
425 [o_button sizeToFit]; \
426 [o_button setTarget: self]; \
427 [o_button setAction: @selector(action:)]; \
428 [self addSubview:o_button];
430 #define addTextfield( class, o_text, align, font, color ) \
431 o_text = [[class alloc] initWithFrame: s_rc]; \
432 [o_text setDrawsBackground: NO]; \
433 [o_text setBordered: NO]; \
434 [o_text setEditable: NO]; \
435 [o_text setSelectable: NO]; \
436 [o_text setStringValue: _NS("(no item is being played)")]; \
437 [o_text setAlignment: align]; \
438 [o_text setTextColor: [NSColor color]]; \
439 [o_text setFont:[NSFont font:[NSFont smallSystemFontSize]]]; \
440 [self addSubview:o_text];
442 #define restyleButton( o_button, imageOff, imageOn, _x, _y ) \
443 [o_button setFrameOrigin: NSMakePoint( _x, _y )]; \
444 [o_button setImage: [NSImage imageNamed: imageOff]]; \
445 [o_button setAlternateImage: [NSImage imageNamed: imageOn]]; \
446 [o_button sizeToFit]; \
447 [o_button setNeedsDisplay: YES]
449 #define restyleTextfieldOrSlider( o_field, _x, _y, _w, _h ) \
450 [o_field setFrameOrigin: NSMakePoint( _x, _y )]; \
451 [o_field setFrameSize: NSMakeSize( _w, _h )]; \
452 [o_field setNeedsDisplay: YES]
455 - (id)initWithFrame:(NSRect)frameRect
457 id view = [super initWithFrame:frameRect];
458 fillColor = [[NSColor clearColor] retain];
459 NSRect s_rc = [self frame];
460 addButton( o_prev, @"fs_skip_previous" , @"fs_skip_previous_highlight", 174, 15, prev );
461 addButton( o_bwd, @"fs_rewind" , @"fs_rewind_highlight" , 211, 14, backward );
462 addButton( o_play, @"fs_play" , @"fs_play_highlight" , 267, 10, play );
463 addButton( o_fwd, @"fs_forward" , @"fs_forward_highlight" , 313, 14, forward );
464 addButton( o_next, @"fs_skip_next" , @"fs_skip_next_highlight" , 365, 15, next );
465 addButton( o_fullscreen, @"fs_exit_fullscreen", @"fs_exit_fullscreen_hightlight", 507, 13, toggleFullscreen );
467 addButton( o_button, @"image (off state)", @"image (on state)", 38, 51, something );
474 s_rc.size.width = 518;
475 s_rc.size.height = 9;
476 o_fs_timeSlider = [[VLCFSTimeSlider alloc] initWithFrame: s_rc];
477 [o_fs_timeSlider setMinValue:0];
478 [o_fs_timeSlider setMaxValue:10000];
479 [o_fs_timeSlider setFloatValue: 0];
480 [o_fs_timeSlider setContinuous: YES];
481 [o_fs_timeSlider setTarget: self];
482 [o_fs_timeSlider setAction: @selector(fsTimeSliderUpdate:)];
483 [self addSubview: o_fs_timeSlider];
489 s_rc.size.width = 95;
490 s_rc.size.height = 10;
491 o_fs_volumeSlider = [[VLCFSVolumeSlider alloc] initWithFrame: s_rc];
492 [o_fs_volumeSlider setMinValue:0];
493 [o_fs_volumeSlider setMaxValue:32];
494 [o_fs_volumeSlider setFloatValue: 0];
495 [o_fs_volumeSlider setContinuous: YES];
496 [o_fs_volumeSlider setTarget: self];
497 [o_fs_volumeSlider setAction: @selector(fsVolumeSliderUpdate:)];
498 [self addSubview: o_fs_volumeSlider];
500 /* time counter and stream title output fields */
504 s_rc.size.width = 352;
505 s_rc.size.height = 14;
506 addTextfield( NSTextField, o_streamTitle_txt, NSCenterTextAlignment, systemFontOfSize, whiteColor );
509 s_rc.size.width = 55;
510 addTextfield( VLCTimeField, o_streamPosition_txt, NSRightTextAlignment, systemFontOfSize, whiteColor );
517 [o_fs_timeSlider release];
518 [o_fs_volumeSlider release];
524 [o_fullscreen release];
525 [o_streamTitle_txt release];
526 [o_streamPosition_txt release];
532 if( b_usingBigScreen )
534 [o_play setImage:[NSImage imageNamed:@"fs_play@x1.5"]];
535 [o_play setAlternateImage: [NSImage imageNamed:@"fs_play_highlight@x1.5"]];
539 [o_play setImage:[NSImage imageNamed:@"fs_play"]];
540 [o_play setAlternateImage: [NSImage imageNamed:@"fs_play_highlight"]];
546 if( b_usingBigScreen )
548 [o_play setImage: [NSImage imageNamed:@"fs_pause@x1.5"]];
549 [o_play setAlternateImage: [NSImage imageNamed:@"fs_pause_highlight@x1.5"]];
553 [o_play setImage: [NSImage imageNamed:@"fs_pause"]];
554 [o_play setAlternateImage: [NSImage imageNamed:@"fs_pause_highlight"]];
558 - (void)setStreamTitle:(NSString *)o_title
560 [o_streamTitle_txt setStringValue: o_title];
563 - (void)setStreamPos:(float) f_pos andTime:(NSString *)o_time
565 [o_streamPosition_txt setStringValue: o_time];
566 [o_fs_timeSlider setFloatValue: f_pos];
569 - (void)setSeekable:(BOOL)b_seekable
571 [o_bwd setEnabled: b_seekable];
572 [o_fwd setEnabled: b_seekable];
573 [o_fs_timeSlider setEnabled: b_seekable];
576 - (void)setVolumeLevel: (float)f_volumeLevel
578 [o_fs_volumeSlider setFloatValue: f_volumeLevel];
581 - (IBAction)play:(id)sender
583 [[VLCCoreInteraction sharedInstance] play];
586 - (IBAction)forward:(id)sender
588 [[VLCCoreInteraction sharedInstance] forward];
591 - (IBAction)backward:(id)sender
593 [[VLCCoreInteraction sharedInstance] backward];
596 - (IBAction)prev:(id)sender
598 [[VLCCoreInteraction sharedInstance] previous];
601 - (IBAction)next:(id)sender
603 [[VLCCoreInteraction sharedInstance] next];
606 - (IBAction)toggleFullscreen:(id)sender
608 [[VLCCoreInteraction sharedInstance] toggleFullscreen];
611 - (IBAction)fsTimeSliderUpdate:(id)sender
613 input_thread_t * p_input;
614 p_input = pl_CurrentInput( VLCIntf );
615 if( p_input != NULL )
619 pos.f_float = [o_fs_timeSlider floatValue] / 10000.;
620 var_Set( p_input, "position", pos );
621 vlc_object_release( p_input );
623 [[VLCMain sharedInstance] updatePlaybackPosition];
626 - (IBAction)fsVolumeSliderUpdate:(id)sender
628 [[VLCCoreInteraction sharedInstance] setVolume: [sender intValue]];
631 #define addImage(image, _x, _y, mode, _width) \
632 img = [NSImage imageNamed:image]; \
633 image_rect.size = [img size]; \
634 image_rect.origin.x = 0; \
635 image_rect.origin.y = 0; \
636 frame.origin.x = _x; \
637 frame.origin.y = _y; \
638 frame.size = [img size]; \
639 if( _width ) frame.size.width = _width; \
640 [img drawInRect:frame fromRect:image_rect operation:mode fraction:1];
642 - (void)drawRect:(NSRect)rect
644 NSRect frame = [self frame];
647 if (b_usingBigScreen)
649 addImage( @"fs_background@x1.5", 0, 0, NSCompositeCopy, 0 );
650 addImage( @"fs_volume_slider_bar@x1.5", 39, 35.5, NSCompositeSourceOver, 0 );
651 addImage( @"fs_volume_mute@x1.5", 24, 27, NSCompositeSourceOver, 0 );
652 addImage( @"fs_volume_max@x1.5", 186, 27, NSCompositeSourceOver, 0 );
653 addImage( @"fs_time_slider@x1.5", 22.5, 79.5, NSCompositeSourceOver, 0);
657 addImage( @"fs_background", 0, 0, NSCompositeCopy, 0 );
658 addImage( @"fs_volume_slider_bar", 26, 23, NSCompositeSourceOver, 0 );
659 addImage( @"fs_volume_mute", 16, 18, NSCompositeSourceOver, 0 );
660 addImage( @"fs_volume_max", 124, 18, NSCompositeSourceOver, 0 );
661 addImage( @"fs_time_slider", 15, 53, NSCompositeSourceOver, 0);
665 - (void)adaptViewSizeToScreen:(BOOL)b_value
667 b_usingBigScreen = b_value;
669 if (b_usingBigScreen)
671 restyleButton( o_prev, @"fs_skip_previous@x1.5", @"fs_skip_previous_highlight@x1.5", 261, 22.5 );
672 restyleButton( o_bwd, @"fs_rewind@x1.5", @"fs_rewind_highlight@x1.5", 316.5, 21 );
673 restyleButton( o_play, @"fs_play@x1.5", @"fs_play_highlight@x1.5", 400.5, 15 );
674 restyleButton( o_fwd, @"fs_forward@x1.5", @"fs_forward_highlight@x1.5", 469.5, 21 );
675 restyleButton( o_next, @"fs_skip_next@x1.5", @"fs_skip_next_highlight@x1.5", 547.5, 22.5 );
676 restyleButton( o_fullscreen, @"fs_exit_fullscreen@x1.5", @"fs_exit_fullscreen_hightlight@x1.5", 765.5, 19.5 );
677 restyleTextfieldOrSlider( o_streamTitle_txt, 148, 96, 528, 21 );
678 [o_streamTitle_txt setFont:[NSFont systemFontOfSize:[NSFont systemFontSize]]];
679 restyleTextfieldOrSlider( o_streamPosition_txt, 718, 96, 82.5, 21 );
680 [o_streamPosition_txt setFont:[NSFont systemFontOfSize:[NSFont systemFontSize]]];
681 restyleTextfieldOrSlider( o_fs_timeSlider, 22.5, 82.5, 777, 13.5 );
682 restyleTextfieldOrSlider( o_fs_volumeSlider, 39, 32, 142.5, 15);
686 restyleButton( o_prev, @"fs_skip_previous", @"fs_skip_previous_highlight", 174, 15 );
687 restyleButton( o_bwd, @"fs_rewind", @"fs_rewind_highlight", 211, 14 );
688 restyleButton( o_play, @"fs_play", @"fs_play_highlight", 267, 10 );
689 restyleButton( o_fwd, @"fs_forward", @"fs_forward_highlight", 313, 14 );
690 restyleButton( o_next, @"fs_skip_next", @"fs_skip_next_highlight", 365, 15 );
691 restyleButton( o_fullscreen, @"fs_exit_fullscreen", @"fs_exit_fullscreen_hightlight", 507, 13 );
692 restyleTextfieldOrSlider( o_streamTitle_txt, 98, 64, 352, 14 );
693 [o_streamTitle_txt setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
694 restyleTextfieldOrSlider( o_streamPosition_txt, 481, 64, 55, 14);
695 [o_streamPosition_txt setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
696 restyleTextfieldOrSlider( o_fs_timeSlider, 15, 55, 518, 9 );
697 restyleTextfieldOrSlider( o_fs_volumeSlider, 26, 20, 95, 10);
703 /*****************************************************************************
705 *****************************************************************************/
706 @implementation VLCFSTimeSlider
707 - (void)drawKnobInRect:(NSRect)knobRect
710 NSImage *img = [NSImage imageNamed:@"fs_time_slider_knob_highlight"];
711 image_rect.size = [img size];
712 image_rect.origin.x = 0;
713 image_rect.origin.y = 0;
714 knobRect.origin.x += (knobRect.size.width - image_rect.size.width) / 2;
715 knobRect.size.width = image_rect.size.width;
716 knobRect.size.height = image_rect.size.height;
717 [img drawInRect:knobRect fromRect:image_rect operation:NSCompositeSourceOver fraction:1];
720 - (void)drawRect:(NSRect)rect
722 /* Draw default to make sure the slider behaves correctly */
723 [[NSGraphicsContext currentContext] saveGraphicsState];
724 NSRectClip(NSZeroRect);
725 [super drawRect:rect];
726 [[NSGraphicsContext currentContext] restoreGraphicsState];
728 NSRect knobRect = [[self cell] knobRectFlipped:NO];
729 knobRect.origin.y+=7.5;
730 [[[NSColor blackColor] colorWithAlphaComponent:0.6] set];
731 [self drawKnobInRect: knobRect];
736 /*****************************************************************************
738 *****************************************************************************/
739 @implementation VLCFSVolumeSlider
740 - (void)drawKnobInRect:(NSRect) knobRect
743 NSImage *img = [NSImage imageNamed:@"fs_volume_slider_knob"];
744 image_rect.size = [img size];
745 image_rect.origin.x = 0;
746 image_rect.origin.y = 0;
747 knobRect.origin.x += (knobRect.size.width - image_rect.size.width) / 2;
748 knobRect.size.width = image_rect.size.width;
749 knobRect.size.height = image_rect.size.height;
750 [img drawInRect:knobRect fromRect:image_rect operation:NSCompositeSourceOver fraction:1];
753 - (void)drawRect:(NSRect)rect
755 /* Draw default to make sure the slider behaves correctly */
756 [[NSGraphicsContext currentContext] saveGraphicsState];
757 NSRectClip(NSZeroRect);
758 [super drawRect:rect];
759 [[NSGraphicsContext currentContext] restoreGraphicsState];
761 NSRect knobRect = [[self cell] knobRectFlipped:NO];
762 knobRect.origin.y+=6;
763 [[[NSColor blackColor] colorWithAlphaComponent:0.6] set];
764 [self drawKnobInRect: knobRect];