[vlc-commits] [Git][videolan/vlc][master] 3 commits: macosx: Glassify carousel scroll buttons

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Mon Mar 23 11:05:45 UTC 2026



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


Commits:
eed1e292 by Claudio Cambra at 2026-03-23T10:49:47+01:00
macosx: Glassify carousel scroll buttons

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
bbd4939f by Claudio Cambra at 2026-03-23T10:49:47+01:00
macosx: Make glass carousel button square

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
1ab0f0ff by Claudio Cambra at 2026-03-23T10:49:47+01:00
macosx: Make carousel buttons circular when using glass effect

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -


1 changed file:

- modules/gui/macosx/library/home-library/VLCLibraryHomeViewBaseCarouselContainerView.m


Changes:

=====================================
modules/gui/macosx/library/home-library/VLCLibraryHomeViewBaseCarouselContainerView.m
=====================================
@@ -106,36 +106,52 @@
         [self.bottomAnchor constraintEqualToAnchor:self.carouselView.bottomAnchor]
     ]];
 
-    const CGFloat buttonWidth = VLCLibraryUIUnits.largeSpacing;
-    const CGFloat buttonHeight = 
-        VLCLibraryUIUnits.carouselViewItemViewHeight - VLCLibraryUIUnits.largeSpacing;
+    const CGFloat buttonSize = VLCLibraryUIUnits.largeSpacing;
 
     NSImage * const leftImage = [NSImage imageNamed:@"NSGoLeftTemplate"];
     _leftButton = [[NSButton alloc] initWithFrame:NSZeroRect];
     self.leftButton.translatesAutoresizingMaskIntoConstraints = NO;
     self.leftButton.image = leftImage;
-    self.leftButton.bezelStyle = NSBezelStyleCircular;
     self.leftButton.target = self;
     self.leftButton.action = @selector(scrollLeft:);
     [self addSubview:self.leftButton];
     [NSLayoutConstraint activateConstraints:@[
         [self.leftButton.leadingAnchor constraintEqualToAnchor:self.leadingAnchor],
-        [self.leftButton.centerYAnchor constraintEqualToAnchor:self.carouselView.centerYAnchor]
+        [self.leftButton.centerYAnchor constraintEqualToAnchor:self.carouselView.centerYAnchor],
+        [self.leftButton.widthAnchor constraintEqualToConstant:buttonSize],
+        [self.leftButton.heightAnchor constraintEqualToConstant:buttonSize],
     ]];
 
     NSImage * const rightImage = [NSImage imageNamed:@"NSGoRightTemplate"];
     _rightButton = [[NSButton alloc] initWithFrame:NSZeroRect];
     self.rightButton.translatesAutoresizingMaskIntoConstraints = NO;
     self.rightButton.image = rightImage;
-    self.rightButton.bezelStyle = NSBezelStyleCircular;
     self.rightButton.target = self;
     self.rightButton.action = @selector(scrollRight:);
     [self addSubview:self.rightButton];
     [NSLayoutConstraint activateConstraints:@[
         [self.rightButton.trailingAnchor constraintEqualToAnchor:self.carouselView.trailingAnchor],
-        [self.rightButton.centerYAnchor constraintEqualToAnchor:self.carouselView.centerYAnchor]
+        [self.rightButton.centerYAnchor constraintEqualToAnchor:self.carouselView.centerYAnchor],
+        [self.rightButton.widthAnchor constraintEqualToConstant:buttonSize],
+        [self.rightButton.heightAnchor constraintEqualToConstant:buttonSize],
     ]];
 
+#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 260000
+    if (@available(macOS 26.0, *)) {
+        self.leftButton.bordered = YES;
+        self.leftButton.bezelStyle = NSBezelStyleGlass;
+        self.leftButton.borderShape = NSControlBorderShapeCircle;
+        self.rightButton.bordered = YES;
+        self.rightButton.bezelStyle = NSBezelStyleGlass;
+        self.rightButton.borderShape = NSControlBorderShapeCircle;
+    } else {
+#endif
+        self.leftButton.bezelStyle = NSBezelStyleCircular;
+        self.rightButton.bezelStyle = NSBezelStyleCircular;
+#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 260000
+    }
+#endif
+
     _itemHeight = VLCLibraryUIUnits.carouselViewItemViewHeight;
 
     [self updateCarouselViewHeight];



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/b8387dc9aac5958372f31ea6142ef3b4b4d68e3f...1ab0f0ff9ac931dca675b9b7f3534a635b8f5eca

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/b8387dc9aac5958372f31ea6142ef3b4b4d68e3f...1ab0f0ff9ac931dca675b9b7f3534a635b8f5eca
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list