Commit a0ebcbbd authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: really fixed the time line drawing artifacts (close #6057)

(cherry picked from commit 55a47406fd1391b61b85b2051951434741e299a9)
parent 3375d109
......@@ -26,7 +26,7 @@
<integer value="4722"/>
<integer value="4850"/>
<integer value="2770"/>
<integer value="21"/>
<integer value="4756"/>
<integer value="29"/>
<integer value="2730"/>
<integer value="283"/>
......@@ -672,7 +672,6 @@
<string key="NSFrame">{{218, 11}, {60, 12}}</string>
<reference key="NSSuperview" ref="129808516"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<bool key="NSViewCanDrawConcurrently">YES</bool>
<string key="NSClassName">VLCThreePartImageView</string>
</object>
<object class="NSButton" id="707945673">
......@@ -1141,7 +1140,6 @@
<string key="NSFrame">{{-1, 0}, {605, 36}}</string>
<reference key="NSSuperview" ref="429932428"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<bool key="NSViewCanDrawConcurrently">YES</bool>
<string key="NSClassName">VLCThreePartDropView</string>
</object>
</object>
......
......@@ -463,6 +463,11 @@ static VLCMainWindow *_o_sharedInstance = nil;
[o_sidebar_scrollview setBorderType: NSNoBorder];
}
NSRect frame;
frame = [o_time_sld_fancygradient_view frame];
frame.size.width = 0;
[o_time_sld_fancygradient_view setFrame: frame];
if (OSX_LION)
[o_resize_view setImage: NULL];
......@@ -1240,9 +1245,9 @@ static VLCMainWindow *_o_sharedInstance = nil;
NSRect oldFrame = [o_time_sld_fancygradient_view frame];
if (f_value != oldFrame.size.width)
{
[o_time_sld_fancygradient_view setHidden: NO];
if ([o_time_sld_fancygradient_view isHidden])
[o_time_sld_fancygradient_view setHidden: NO];
[o_time_sld_fancygradient_view setFrame: NSMakeRect( oldFrame.origin.x, oldFrame.origin.y, f_value, oldFrame.size.height )];
[o_time_sld_fancygradient_view setNeedsDisplay:YES];
}
}
else
......
......@@ -672,6 +672,9 @@ void _drawFrameInRect(NSRect frameRect)
- (void)drawRect:(NSRect)rect
{
[(VLCMainWindow *)[self window] drawFancyGradientEffectForTimeSlider];
msleep( 10000 ); //wait for the gradient to draw completely
/* Draw default to make sure the slider behaves correctly */
[[NSGraphicsContext currentContext] saveGraphicsState];
NSRectClip(NSZeroRect);
......@@ -681,8 +684,6 @@ void _drawFrameInRect(NSRect frameRect)
NSRect knobRect = [[self cell] knobRectFlipped:NO];
knobRect.origin.y+=1;
[self drawKnobInRect: knobRect];
[(VLCMainWindow *)[self window] drawFancyGradientEffectForTimeSlider];
}
@end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment