[vlc-devel] [VLC 3.x 09/11] macosx: Set correct state/highlight for badge button

Marvin Scholz epirat07 at gmail.com
Wed Aug 26 00:50:15 CEST 2020


(cherry picked from commit cae48baeb1e91f1c5fa4442ec807b2bc5f70237e)
Signed-off-by: Marvin Scholz <epirat07 at gmail.com>
---
 modules/gui/macosx/VLCSourceListBadgeButton.m | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/modules/gui/macosx/VLCSourceListBadgeButton.m b/modules/gui/macosx/VLCSourceListBadgeButton.m
index ec14deef04..edc6a2cc14 100644
--- a/modules/gui/macosx/VLCSourceListBadgeButton.m
+++ b/modules/gui/macosx/VLCSourceListBadgeButton.m
@@ -33,6 +33,17 @@ - (NSView *)hitTest:(NSPoint)point
     return nil;
 }
 
+- (instancetype)initWithCoder:(NSCoder *)coder
+{
+    self = [super initWithCoder:coder];
+    if (self) {
+        [(NSButtonCell*)[self cell] setShowsStateBy:0];
+        [(NSButtonCell*)[self cell] setHighlightsBy:0];
+    }
+
+    return self;
+}
+
 /* Our badges show integer values so make it easier to set those by setting
  * the title depending on the integer value.
  */
-- 
2.24.3 (Apple Git-128)



More information about the vlc-devel mailing list