[vlc-commits] [Git][videolan/vlc][master] macosx: Fix bottom control bar visual bugs

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Mon Jun 27 09:27:18 UTC 2022



Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
68625f4a by Claudio Cambra at 2022-06-27T09:11:20+00:00
macosx: Fix bottom control bar visual bugs

Signed-off-by: Claudio Cambra <claudio.cambra at gmail.com>

- - - - -


2 changed files:

- modules/gui/macosx/views/VLCBottomBarView.h
- modules/gui/macosx/views/VLCBottomBarView.m


Changes:

=====================================
modules/gui/macosx/views/VLCBottomBarView.h
=====================================
@@ -30,6 +30,6 @@
 @property NSColor *lightStroke;
 @property NSColor *darkStroke;
 
- at property (setter=setDark:) BOOL isDark;
+ at property (readwrite) BOOL isDark;
 
 @end


=====================================
modules/gui/macosx/views/VLCBottomBarView.m
=====================================
@@ -147,13 +147,16 @@
 
 - (void)viewDidChangeEffectiveAppearance
 {
-    [self setDark:self.shouldShowDarkAppearance];
-    [self setNeedsDisplay:YES];
-}
+    [super viewDidChangeEffectiveAppearance];
 
-- (BOOL)allowsVibrancy
-{
-    return YES;
+    BOOL setDark = NO;
+
+    if (@available(macOS 10.14, *) && [self.effectiveAppearance.name isEqualToString:NSAppearanceNameVibrantDark]) {
+        setDark = YES;
+    }
+    
+    _isDark = setDark;
+    [self setNeedsDisplay:YES];
 }
 
 @end



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/68625f4a4fa3afdbd4aa0e3f6a75a852bfe07be2

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/68625f4a4fa3afdbd4aa0e3f6a75a852bfe07be2
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list