diff --git a/modules/gui/macosx/library/home-library/VLCLibraryHomeViewBaseCarouselContainerView.h b/modules/gui/macosx/library/home-library/VLCLibraryHomeViewBaseCarouselContainerView.h index 6dca720f3e..954011eee3 100644 --- a/modules/gui/macosx/library/home-library/VLCLibraryHomeViewBaseCarouselContainerView.h +++ b/modules/gui/macosx/library/home-library/VLCLibraryHomeViewBaseCarouselContainerView.h @@ -33,6 +33,8 @@ NS_ASSUME_NONNULL_BEGIN @property (readonly) NSTextField *titleView; @property (readonly) iCarousel *carouselView; +@property (readonly) NSButton *leftButton; +@property (readonly) NSButton *rightButton; @property (readonly) NSObject *delegate; @property (readonly) NSObject *dataSource; // We want the carousel view to be packed tight around the actual items and not have excess space. diff --git a/modules/gui/macosx/library/home-library/VLCLibraryHomeViewBaseCarouselContainerView.m b/modules/gui/macosx/library/home-library/VLCLibraryHomeViewBaseCarouselContainerView.m index ebbc966caf..75f7eff515 100644 --- a/modules/gui/macosx/library/home-library/VLCLibraryHomeViewBaseCarouselContainerView.m +++ b/modules/gui/macosx/library/home-library/VLCLibraryHomeViewBaseCarouselContainerView.m @@ -111,29 +111,29 @@ NSImage * const leftImage = [NSImage imageNamed:@"NSGoLeftTemplate"]; - NSButton * const leftButton = [[NSButton alloc] initWithFrame:NSZeroRect]; - leftButton.translatesAutoresizingMaskIntoConstraints = NO; - leftButton.image = leftImage; - leftButton.bezelStyle = NSBezelStyleCircular; - leftButton.target = self; - leftButton.action = @selector(scrollLeft:); - [self addSubview:leftButton]; + _leftButton = [[NSButton alloc] initWithFrame:NSZeroRect]; + self.leftButton.translatesAutoresizingMaskIntoConstraints = NO; + self.leftButton.image = leftImage; + self.leftButton.bezelStyle = NSBezelStylePush; + self.leftButton.target = self; + self.leftButton.action = @selector(scrollLeft:); + [self addSubview:self.leftButton]; [NSLayoutConstraint activateConstraints:@[ - [leftButton.leadingAnchor constraintEqualToAnchor:self.leadingAnchor], - [leftButton.centerYAnchor constraintEqualToAnchor:self.carouselView.centerYAnchor] + [self.leftButton.leadingAnchor constraintEqualToAnchor:self.leadingAnchor], + [self.leftButton.centerYAnchor constraintEqualToAnchor:self.carouselView.centerYAnchor] ]]; NSImage * const rightImage = [NSImage imageNamed:@"NSGoRightTemplate"]; - NSButton * const rightButton = [[NSButton alloc] initWithFrame:NSZeroRect]; - rightButton.translatesAutoresizingMaskIntoConstraints = NO; - rightButton.image = rightImage; - rightButton.bezelStyle = NSBezelStyleCircular; - rightButton.target = self; - rightButton.action = @selector(scrollRight:); - [self addSubview:rightButton]; + _rightButton = [[NSButton alloc] initWithFrame:NSZeroRect]; + self.rightButton.translatesAutoresizingMaskIntoConstraints = NO; + self.rightButton.image = rightImage; + self.rightButton.bezelStyle = NSBezelStylePush; + self.rightButton.target = self; + self.rightButton.action = @selector(scrollRight:); + [self addSubview:self.rightButton]; [NSLayoutConstraint activateConstraints:@[ - [rightButton.trailingAnchor constraintEqualToAnchor:self.carouselView.trailingAnchor], - [rightButton.centerYAnchor constraintEqualToAnchor:self.carouselView.centerYAnchor] + [self.rightButton.trailingAnchor constraintEqualToAnchor:self.carouselView.trailingAnchor], + [self.rightButton.centerYAnchor constraintEqualToAnchor:self.carouselView.centerYAnchor] ]]; _itemHeight = VLCLibraryUIUnits.carouselViewItemViewHeight;