Commit c07294b1 authored by David Fuhrmann's avatar David Fuhrmann

macosx: set better colors for playback speed controls (close #12633)

parent 44902c2e
......@@ -98,7 +98,6 @@
IBOutlet NSMenuItem * o_mi_rate;
IBOutlet NSView * o_mi_rate_view;
IBOutlet id o_mi_rate_lbl;
IBOutlet id o_mi_rate_lbl_gray;
IBOutlet id o_mi_rate_slower_lbl;
IBOutlet id o_mi_rate_normal_lbl;
IBOutlet id o_mi_rate_faster_lbl;
......
......@@ -137,6 +137,8 @@ static VLCMainMenu *_o_sharedInstance = nil;
msg_Dbg(VLCIntf, "adapting interface since '%s' is a RTL language", [preferredLanguage UTF8String]);
[o_mi_rate_fld setAlignment: NSLeftTextAlignment];
}
[self setRateControlsEnabled:NO];
}
- (void)applicationWillFinishLaunching:(NSNotification *)o_notification
......@@ -700,13 +702,15 @@ static VLCMainMenu *_o_sharedInstance = nil;
int i = [[VLCCoreInteraction sharedInstance] playbackRate];
double speed = pow(2, (double)i / 17);
[o_mi_rate_fld setStringValue: [NSString stringWithFormat:@"%.2fx", speed]];
if (b_enabled) {
[o_mi_rate_lbl setHidden: NO];
[o_mi_rate_lbl_gray setHidden: YES];
} else {
[o_mi_rate_lbl setHidden: YES];
[o_mi_rate_lbl_gray setHidden: NO];
}
NSColor *o_color = b_enabled ? [NSColor controlTextColor] : [NSColor disabledControlTextColor];
[o_mi_rate_lbl setTextColor:o_color];
[o_mi_rate_slower_lbl setTextColor:o_color];
[o_mi_rate_normal_lbl setTextColor:o_color];
[o_mi_rate_faster_lbl setTextColor:o_color];
[o_mi_rate_fld setTextColor:o_color];
[self setSubtitleMenuEnabled: b_enabled];
[o_pool release];
}
......
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