[vlc-commits] macOS: Simplify copying of VLCHUDRadiobuttonCell title

Marvin Scholz git at videolan.org
Wed Jun 21 00:35:47 CEST 2017


vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Wed Jun 21 00:21:49 2017 +0200| [35fe5625b01036247736d9a23f47822250de1aeb] | committer: Marvin Scholz

macOS: Simplify copying of VLCHUDRadiobuttonCell title

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

 modules/gui/macosx/VLCHUDRadiobuttonCell.m | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/VLCHUDRadiobuttonCell.m b/modules/gui/macosx/VLCHUDRadiobuttonCell.m
index 8a07745ef8..33e1e3715a 100644
--- a/modules/gui/macosx/VLCHUDRadiobuttonCell.m
+++ b/modules/gui/macosx/VLCHUDRadiobuttonCell.m
@@ -104,8 +104,8 @@
 
 - (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]



More information about the vlc-commits mailing list