macOS: Simplify copying of VLCHUDRadiobuttonCell title
authorMarvin Scholz <epirat07@gmail.com>
Tue, 20 Jun 2017 22:21:49 +0000 (00:21 +0200)
committerMarvin Scholz <epirat07@gmail.com>
Tue, 20 Jun 2017 22:25:41 +0000 (00:25 +0200)
modules/gui/macosx/VLCHUDRadiobuttonCell.m

index 8a07745..33e1e37 100644 (file)
 
 - (NSRect)drawTitle:(NSAttributedString *)title withFrame:(NSRect)frame inView:(NSView *)controlView
 {
-    NSMutableAttributedString *coloredTitle = [[NSMutableAttributedString alloc]
-                                               initWithAttributedString:title];
+    NSMutableAttributedString *coloredTitle = [title mutableCopy];
+
     if (self.isEnabled) {
         [coloredTitle addAttribute:NSForegroundColorAttributeName
                              value:[NSColor whiteColor]