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

macosx: fixed time slider alignment issue

Pointed by Damien
parent f836a238
...@@ -134,6 +134,7 @@ ...@@ -134,6 +134,7 @@
{ {
NSImage *o_knob_img; NSImage *o_knob_img;
NSRect img_rect; NSRect img_rect;
BOOL b_dark;
} }
- (CGFloat)knobPosition; - (CGFloat)knobPosition;
......
...@@ -607,10 +607,13 @@ void _drawFrameInRect(NSRect frameRect) ...@@ -607,10 +607,13 @@ void _drawFrameInRect(NSRect frameRect)
- (void)awakeFromNib - (void)awakeFromNib
{ {
if (config_GetInt( VLCIntf, "macosx-interfacestyle" )) if (config_GetInt( VLCIntf, "macosx-interfacestyle" )) {
o_knob_img = [NSImage imageNamed:@"progression-knob_dark"]; o_knob_img = [NSImage imageNamed:@"progression-knob_dark"];
else b_dark = YES;
} else {
o_knob_img = [NSImage imageNamed:@"progression-knob"]; o_knob_img = [NSImage imageNamed:@"progression-knob"];
b_dark = NO;
}
img_rect.size = [o_knob_img size]; img_rect.size = [o_knob_img size];
img_rect.origin.x = img_rect.origin.y = 0; img_rect.origin.x = img_rect.origin.y = 0;
} }
...@@ -648,7 +651,10 @@ void _drawFrameInRect(NSRect frameRect) ...@@ -648,7 +651,10 @@ void _drawFrameInRect(NSRect frameRect)
[[NSGraphicsContext currentContext] restoreGraphicsState]; [[NSGraphicsContext currentContext] restoreGraphicsState];
NSRect knobRect = [[self cell] knobRectFlipped:NO]; NSRect knobRect = [[self cell] knobRectFlipped:NO];
knobRect.origin.y+=1; if (b_dark)
knobRect.origin.y+=2;
else
knobRect.origin.y+=1;
[self drawKnobInRect: knobRect]; [self drawKnobInRect: knobRect];
} }
......
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