[vlc-devel] [PATCH 5/9] macosx: Correct VLCHUDRadiobuttonCell state colors
Marvin Scholz
epirat07 at gmail.com
Sun Jun 5 11:28:27 CEST 2016
---
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 @@ - (void) drawImage:(NSImage *)image withFrame:(NSRect)frame inView:(NSView *)con
}
}
+- (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
--
2.7.4 (Apple Git-66)
More information about the vlc-devel
mailing list