[vlc-commits] macosx: fixed time slider alignment issue
Felix Paul Kühne
git at videolan.org
Wed Jul 4 12:57:58 CEST 2012
vlc/vlc-2.0 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Tue Jul 3 15:06:00 2012 +0200| [f4a16defc1896b971ed31c2c63e373a94cd80689] | committer: Felix Paul Kühne
macosx: fixed time slider alignment issue
Pointed by Damien
(cherry picked from commit 20484554dc35aecc15fdb8c492d6a9ad591c5695)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=f4a16defc1896b971ed31c2c63e373a94cd80689
---
modules/gui/macosx/misc.h | 1 +
modules/gui/macosx/misc.m | 12 +++++++++---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/modules/gui/macosx/misc.h b/modules/gui/macosx/misc.h
index 3540bac..28762aa 100644
--- a/modules/gui/macosx/misc.h
+++ b/modules/gui/macosx/misc.h
@@ -118,6 +118,7 @@
{
NSImage *o_knob_img;
NSRect img_rect;
+ BOOL b_dark;
}
- (CGFloat)knobPosition;
diff --git a/modules/gui/macosx/misc.m b/modules/gui/macosx/misc.m
index 09018be..9c313b0 100644
--- a/modules/gui/macosx/misc.m
+++ b/modules/gui/macosx/misc.m
@@ -513,10 +513,13 @@ void _drawFrameInRect(NSRect frameRect)
- (void)awakeFromNib
{
- if (config_GetInt( VLCIntf, "macosx-interfacestyle" ))
+ if (config_GetInt( VLCIntf, "macosx-interfacestyle" )) {
o_knob_img = [NSImage imageNamed:@"progression-knob_dark"];
- else
+ b_dark = YES;
+ } else {
o_knob_img = [NSImage imageNamed:@"progression-knob"];
+ b_dark = NO;
+ }
img_rect.size = [o_knob_img size];
img_rect.origin.x = img_rect.origin.y = 0;
}
@@ -554,7 +557,10 @@ void _drawFrameInRect(NSRect frameRect)
[[NSGraphicsContext currentContext] restoreGraphicsState];
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];
}
More information about the vlc-commits
mailing list