[vlc-devel] [PATCH 5/8] macosx: Remove no longer required TimeLineSlider subclass
Marvin Scholz
epirat07 at gmail.com
Tue Jul 18 20:30:08 CEST 2017
---
modules/gui/macosx/misc.h | 14 -----------
modules/gui/macosx/misc.m | 60 -----------------------------------------------
2 files changed, 74 deletions(-)
diff --git a/modules/gui/macosx/misc.h b/modules/gui/macosx/misc.h
index 5c566eb15e..fb3893b3cf 100644
--- a/modules/gui/macosx/misc.h
+++ b/modules/gui/macosx/misc.h
@@ -68,20 +68,6 @@
@end
-
-/*****************************************************************************
- * TimeLineSlider
- *****************************************************************************/
-
- at interface TimeLineSlider : NSSlider
-
- at property (readonly) CGFloat knobPosition;
-
-- (void)drawRect:(NSRect)rect;
-- (void)drawKnobInRect:(NSRect)knobRect;
-
- at end
-
/*****************************************************************************
* VLCVolumeSliderCommon
*****************************************************************************/
diff --git a/modules/gui/macosx/misc.m b/modules/gui/macosx/misc.m
index 65dc17e8e7..73e20dfc17 100644
--- a/modules/gui/macosx/misc.m
+++ b/modules/gui/macosx/misc.m
@@ -258,66 +258,6 @@ - (BOOL)acceptsFirstResponder
@end
/*****************************************************************************
- * TimeLineSlider
- *****************************************************************************/
-
- at interface TimeLineSlider()
-{
- NSImage *o_knob_img;
- NSRect img_rect;
- BOOL b_dark;
-}
- at end
-
- at implementation TimeLineSlider
-
-- (void)awakeFromNib
-{
- if (config_GetInt( getIntf(), "macosx-interfacestyle" )) {
- o_knob_img = imageFromRes(@"progression-knob_dark");
- b_dark = YES;
- } else {
- o_knob_img = imageFromRes(@"progression-knob");
- b_dark = NO;
- }
- img_rect.size = [o_knob_img size];
- img_rect.origin.x = img_rect.origin.y = 0;
-}
-
-- (CGFloat)knobPosition
-{
- NSRect knobRect = [[self cell] knobRectFlipped:NO];
- knobRect.origin.x += knobRect.size.width / 2;
- return knobRect.origin.x;
-}
-
-- (void)drawKnobInRect:(NSRect)knobRect
-{
- knobRect.origin.x += (knobRect.size.width - img_rect.size.width) / 2;
- knobRect.size.width = img_rect.size.width;
- knobRect.size.height = img_rect.size.height;
- [o_knob_img drawInRect:knobRect fromRect:img_rect operation:NSCompositeSourceOver fraction:1];
-}
-
-- (void)drawRect:(NSRect)rect
-{
- [[(VLCVideoWindowCommon *)[self window] controlsBar] drawFancyGradientEffectForTimeSlider];
- msleep(10000); //wait for the gradient to draw completely
-
- /* Draw default to make sure the slider behaves correctly */
- [[NSGraphicsContext currentContext] saveGraphicsState];
- NSRectClip(NSZeroRect);
- [super drawRect:rect];
- [[NSGraphicsContext currentContext] restoreGraphicsState];
-
- NSRect knobRect = [[self cell] knobRectFlipped:NO];
- knobRect.origin.y+=1;
- [self drawKnobInRect: knobRect];
-}
-
- at end
-
-/*****************************************************************************
* VLCVolumeSliderCommon
*****************************************************************************/
--
2.11.0 (Apple Git-81)
More information about the vlc-devel
mailing list