[vlc-devel] [PATCH 2/2] macOS: Don't draw custom VLCHUDCheckboxCell on 10.10+

Marvin Scholz epirat07 at gmail.com
Wed Jun 21 02:09:40 CEST 2017


---
 modules/gui/macosx/VLCHUDCheckboxCell.m | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/modules/gui/macosx/VLCHUDCheckboxCell.m b/modules/gui/macosx/VLCHUDCheckboxCell.m
index 93df527d3a..341d4c1c74 100644
--- a/modules/gui/macosx/VLCHUDCheckboxCell.m
+++ b/modules/gui/macosx/VLCHUDCheckboxCell.m
@@ -33,9 +33,19 @@
 //	POSSIBILITY OF SUCH DAMAGE.
 
 #import "VLCHUDCheckboxCell.h"
+#import "CompatibilityFixes.h"
 
 @implementation VLCHUDCheckboxCell
 
++ (void)load
+{
+    if (OSX_YOSEMITE_AND_HIGHER) {
+        swapoutOverride([VLCHUDCheckboxCell class], @selector(initWithCoder:));
+        swapoutOverride([VLCHUDCheckboxCell class], @selector(drawImage:withFrame:inView:));
+        swapoutOverride([VLCHUDCheckboxCell class], @selector(drawTitle:withFrame:inView:));
+    }
+}
+
 - (instancetype)initWithCoder:(NSCoder *)coder
 {
     self = [super initWithCoder:coder];
-- 
2.11.0 (Apple Git-81)



More information about the vlc-devel mailing list