[vlc-commits] [Git][videolan/vlc][master] 3 commits: macosx: Do not run expand animation if newly selected item is on same row as...
Steve Lhomme (@robUx4)
gitlab at videolan.org
Tue Jul 18 16:09:45 UTC 2023
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
33ab8ca3 by Claudio Cambra at 2023-07-18T15:51:19+00:00
macosx: Do not run expand animation if newly selected item is on same row as previously selected item
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
a1a87753 by Claudio Cambra at 2023-07-18T15:51:19+00:00
macosx: Forcibly reopen and stop closure opf supplementary view when item selected during animation
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
e222aa01 by Claudio Cambra at 2023-07-18T15:51:19+00:00
macosx: Smoothly reopen supplementary view when expanded during collapse animation instead of forcing open
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
1 changed file:
- modules/gui/macosx/library/VLCLibraryCollectionViewFlowLayout.m
Changes:
=====================================
modules/gui/macosx/library/VLCLibraryCollectionViewFlowLayout.m
=====================================
@@ -138,8 +138,21 @@ static CVReturn detailViewAnimationCallback(CVDisplayLinkRef displayLink,
return;
}
+ BOOL newItemOnSameRow = NO;
+ if (_selectedIndexPath != nil) {
+ NSCollectionViewItem * const oldSelectedItem = [self.collectionView itemAtIndexPath:_selectedIndexPath];
+ NSCollectionViewItem * const newSelectedItem = [self.collectionView itemAtIndexPath:indexPath];
+
+ newItemOnSameRow = oldSelectedItem.view.frame.origin.y == newSelectedItem.view.frame.origin.y;
+ }
+
_selectedIndexPath = indexPath;
- [self animateDetailViewWithAnimation:VLCDetailViewAnimationTypeExpand];
+
+ if (!newItemOnSameRow) {
+ [self animateDetailViewWithAnimation:VLCDetailViewAnimationTypeExpand];
+ } else {
+ _animationIsCollapse = NO;
+ }
}
- (void)collapseDetailSectionAtIndex:(NSIndexPath *)indexPath
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/bf29572258c9ecf67b64144b8cc6bd93cd37e10c...e222aa013573fe49ef28719762af1acb8715f991
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/bf29572258c9ecf67b64144b8cc6bd93cd37e10c...e222aa013573fe49ef28719762af1acb8715f991
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