From 2b416e23271da8fbd7f4f31b5b16cc67a6556d0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <felix@feepk.net> Date: Thu, 2 May 2019 21:09:40 +0200 Subject: [PATCH] macosx/library: re-order tabs to start with Video instead of Audio This also fixes the indent on top and bottom for the collection view. --- modules/gui/macosx/UI/VLCLibraryWindow.xib | 2 +- modules/gui/macosx/library/VLCLibraryWindow.m | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/gui/macosx/UI/VLCLibraryWindow.xib b/modules/gui/macosx/UI/VLCLibraryWindow.xib index a1d180f1be46..f516b40197f6 100644 --- a/modules/gui/macosx/UI/VLCLibraryWindow.xib +++ b/modules/gui/macosx/UI/VLCLibraryWindow.xib @@ -54,7 +54,7 @@ <autoresizingMask key="autoresizingMask" widthSizable="YES"/> <collectionViewFlowLayout key="collectionViewLayout" minimumInteritemSpacing="20" minimumLineSpacing="20" id="Rag-cM-k1g"> <size key="itemSize" width="256" height="214"/> - <edgeInsets key="sectionInset" left="20" right="20" top="0.0" bottom="0.0"/> + <edgeInsets key="sectionInset" left="20" right="20" top="20" bottom="20"/> </collectionViewFlowLayout> <color key="primaryBackgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/> <color key="secondaryBackgroundColor" name="controlAlternatingRowColor" catalog="System" colorSpace="catalog"/> diff --git a/modules/gui/macosx/library/VLCLibraryWindow.m b/modules/gui/macosx/library/VLCLibraryWindow.m index ebbd8e800795..ec7ffa5eefb8 100644 --- a/modules/gui/macosx/library/VLCLibraryWindow.m +++ b/modules/gui/macosx/library/VLCLibraryWindow.m @@ -104,11 +104,12 @@ static const float f_playlist_row_height = 72.; _segmentedTitleControl.segmentCount = 4; [_segmentedTitleControl setTarget:self]; [_segmentedTitleControl setAction:@selector(segmentedControlAction:)]; - [_segmentedTitleControl setLabel:_NS("Music") forSegment:0]; - [_segmentedTitleControl setLabel:_NS("Video") forSegment:1]; + [_segmentedTitleControl setLabel:_NS("Video") forSegment:0]; + [_segmentedTitleControl setLabel:_NS("Music") forSegment:1]; [_segmentedTitleControl setLabel:_NS("Local Network") forSegment:2]; [_segmentedTitleControl setLabel:_NS("Internet") forSegment:3]; [_segmentedTitleControl sizeToFit]; + [_segmentedTitleControl setSelectedSegment:0]; _playlistDataSource = [[VLCPlaylistDataSource alloc] init]; _playlistDataSource.playlistController = _playlistController; @@ -239,14 +240,14 @@ static const float f_playlist_row_height = 72.; { switch (_segmentedTitleControl.selectedSegment) { case 0: - _libraryDataSource.libraryModel.libraryMode = VLCLibraryModeAudio; + _libraryDataSource.libraryModel.libraryMode = VLCLibraryModeVideo; _mediaSourceScrollView.hidden = YES; _libraryCollectionView.hidden = NO; [_libraryCollectionView reloadData]; break; case 1: - _libraryDataSource.libraryModel.libraryMode = VLCLibraryModeVideo; + _libraryDataSource.libraryModel.libraryMode = VLCLibraryModeAudio; _mediaSourceScrollView.hidden = YES; _libraryCollectionView.hidden = NO; [_libraryCollectionView reloadData]; -- GitLab