[vlc-commits] macosx/library: re-order tabs to start with Video instead of Audio
Felix Paul Kühne
git at videolan.org
Thu May 2 22:56:21 CEST 2019
vlc | branch: master | Felix Paul Kühne <felix at feepk.net> | Thu May 2 21:09:40 2019 +0200| [2b416e23271da8fbd7f4f31b5b16cc67a6556d0a] | committer: Felix Paul Kühne
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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2b416e23271da8fbd7f4f31b5b16cc67a6556d0a
---
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 a1d180f1be..f516b40197 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 ebbd8e8007..ec7ffa5eef 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];
More information about the vlc-commits
mailing list