From b7ed50cb59c5de2cd1053e55e2d4c242dfe92d5d Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Wed, 23 Nov 2022 23:26:08 +0100 Subject: [PATCH] macosx: Fix VLCLibraryCollectionViewFlowLayout content sizing Signed-off-by: Claudio Cambra --- .../library/VLCLibraryCollectionViewFlowLayout.m | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/gui/macosx/library/VLCLibraryCollectionViewFlowLayout.m b/modules/gui/macosx/library/VLCLibraryCollectionViewFlowLayout.m index ef10a2b9f6..1c9fc26258 100644 --- a/modules/gui/macosx/library/VLCLibraryCollectionViewFlowLayout.m +++ b/modules/gui/macosx/library/VLCLibraryCollectionViewFlowLayout.m @@ -159,6 +159,18 @@ static CVReturn detailViewAnimationCallback(CVDisplayLinkRef displayLink, #pragma mark - Flow Layout methods +- (NSSize)collectionViewContentSize +{ + NSSize contentSize = [super collectionViewContentSize]; + + if (!_selectedIndexPath) { + return contentSize; + } + + contentSize.height += [self currentAnimationStep]; + return contentSize; +} + - (NSCollectionViewLayoutAttributes *)layoutAttributesForItemAtIndexPath:(NSIndexPath *)indexPath { NSCollectionViewLayoutAttributes *attributes = [super layoutAttributesForItemAtIndexPath:indexPath];