vlc | branch: master | Marvin Scholz <[email protected]> | Sun Jun  5 11:28:27 
2016 +0200| [5f4b00e0432e65e7409ea38f2280d891c3bf423c] | committer: Felix Paul 
Kühne

macosx: Correct VLCHUDRadiobuttonCell state colors

Signed-off-by: Felix Paul Kühne <[email protected]>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5f4b00e0432e65e7409ea38f2280d891c3bf423c
---

 modules/gui/macosx/VLCHUDRadiobuttonCell.m |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/modules/gui/macosx/VLCHUDRadiobuttonCell.m 
b/modules/gui/macosx/VLCHUDRadiobuttonCell.m
index 68290bf..912735e 100644
--- a/modules/gui/macosx/VLCHUDRadiobuttonCell.m
+++ b/modules/gui/macosx/VLCHUDRadiobuttonCell.m
@@ -92,4 +92,21 @@
     }
 }
 
+- (NSRect)drawTitle:(NSAttributedString *)title withFrame:(NSRect)frame 
inView:(NSView *)controlView
+{
+    NSMutableAttributedString *coloredTitle = [[NSMutableAttributedString 
alloc]
+                                               initWithAttributedString:title];
+    if (self.isEnabled) {
+        [coloredTitle addAttribute:NSForegroundColorAttributeName
+                             value:[NSColor whiteColor]
+                             range:NSMakeRange(0, coloredTitle.length)];
+    } else {
+        [coloredTitle addAttribute:NSForegroundColorAttributeName
+                             value:[NSColor grayColor]
+                             range:NSMakeRange(0, coloredTitle.length)];
+    }
+
+    return [super drawTitle:coloredTitle withFrame:frame inView:controlView];
+}
+
 @end

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to