[vlc-commits] macosx/VLCLibraryWindow: Hide optionBar during Playback
Vibhoothi
git at videolan.org
Wed Aug 5 16:34:31 CEST 2020
vlc | branch: master | Vibhoothi <vibhoothiiaanand at gmail.com> | Fri May 1 00:52:31 2020 +0530| [68c9cbc1cb094f501bdf45b0bfb35057b38df003] | committer: Marvin Scholz
macosx/VLCLibraryWindow: Hide optionBar during Playback
This commit also
+ Hide the buttons and shows only playqueue button
+ Add Tooltip for better UX
Signed-off-by: Marvin Scholz <epirat07 at gmail.com>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=68c9cbc1cb094f501bdf45b0bfb35057b38df003
---
modules/gui/macosx/UI/VLCLibraryWindow.xib | 5 +++++
modules/gui/macosx/library/VLCLibraryWindow.h | 3 +++
modules/gui/macosx/library/VLCLibraryWindow.m | 13 ++++++++++++-
3 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/modules/gui/macosx/UI/VLCLibraryWindow.xib b/modules/gui/macosx/UI/VLCLibraryWindow.xib
index 17ac1a01c5..cf24539257 100644
--- a/modules/gui/macosx/UI/VLCLibraryWindow.xib
+++ b/modules/gui/macosx/UI/VLCLibraryWindow.xib
@@ -563,15 +563,20 @@
<outlet property="mediaSourcePathControl" destination="Rjk-Q6-FYy" id="G63-NM-Ekn"/>
<outlet property="mediaSourceTableView" destination="vpJ-Oz-Ebz" id="Hbo-Qw-JQd"/>
<outlet property="mediaSourceView" destination="eHd-Q9-F8D" id="gfU-Jp-eFr"/>
+ <outlet property="mediaToolBar" destination="pr3-TD-J2z" id="Chi-03-Fgd"/>
<outlet property="openMediaButton" destination="SWh-4E-Qtf" id="sIZ-xo-GLA"/>
+ <outlet property="optionBar" destination="6gW-0d-ymm" id="rkK-gK-uY0"/>
+ <outlet property="playQueueToggle" destination="IaO-se-D0g" id="tqY-YM-KQC"/>
<outlet property="playlistCounterTextField" destination="mbV-My-cm7" id="ZYU-Jq-Z8R"/>
<outlet property="playlistDragDropView" destination="VFI-oW-dMZ" id="gVc-mu-f8T"/>
<outlet property="playlistTableView" destination="Fr1-af-8gb" id="yaB-Ab-jrx"/>
<outlet property="playlistView" destination="dus-WQ-AmE" id="fTF-HP-Chb"/>
+ <outlet property="playqueue" destination="IaO-se-D0g" id="NMT-lQ-7x7"/>
<outlet property="recentVideoLibraryCollectionView" destination="hnE-Hj-MZo" id="Fko-5v-1bC"/>
<outlet property="repeatPlaylistButton" destination="8zF-Wo-H79" id="6bH-HF-arx"/>
<outlet property="segmentedTitleControl" destination="W1M-0o-qYG" id="Gw1-T6-78k"/>
<outlet property="shufflePlaylistButton" destination="jg5-33-vH0" id="FV2-36-3lG"/>
+ <outlet property="test" destination="IaO-se-D0g" id="7nK-TX-QPm"/>
<outlet property="upNextLabel" destination="TET-5r-zHx" id="3oI-LK-NDP"/>
<outlet property="upNextSeparator" destination="qmL-Ar-cj1" id="GRX-ZE-2UG"/>
<outlet property="videoLibraryCollectionView" destination="B8x-e8-7zp" id="u1I-gn-IU1"/>
diff --git a/modules/gui/macosx/library/VLCLibraryWindow.h b/modules/gui/macosx/library/VLCLibraryWindow.h
index 8af94532b2..8eca89bb41 100644
--- a/modules/gui/macosx/library/VLCLibraryWindow.h
+++ b/modules/gui/macosx/library/VLCLibraryWindow.h
@@ -57,6 +57,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (readwrite, weak) IBOutlet NSScrollView *mediaSourceCollectionViewScrollView;
@property (readwrite, weak) IBOutlet NSView *libraryTargetView;
@property (readwrite, weak) IBOutlet NSTableView *playlistTableView;
+ at property (readwrite, weak) IBOutlet NSView *mediaOptionBar;
+ at property (readwrite, weak) IBOutlet NSToolbar *mediaToolBar;
@property (readwrite, weak) IBOutlet NSTextField *upNextLabel;
@property (readwrite, weak) IBOutlet VLCDragDropView *playlistDragDropView;
@property (readwrite, weak) IBOutlet NSButton *openMediaButton;
@@ -67,6 +69,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (readwrite, weak) IBOutlet NSButton *shufflePlaylistButton;
@property (readwrite, weak) IBOutlet VLCRoundedCornerTextField *playlistCounterTextField;
@property (readwrite, weak) IBOutlet NSButton *librarySortButton;
+ at property (readwrite, weak) IBOutlet NSButton *playQueueToggle;
@property (readonly) BOOL nativeFullscreenMode;
@property (readwrite) BOOL nonembedded;
diff --git a/modules/gui/macosx/library/VLCLibraryWindow.m b/modules/gui/macosx/library/VLCLibraryWindow.m
index 4f5c2018c3..2124b02d2a 100644
--- a/modules/gui/macosx/library/VLCLibraryWindow.m
+++ b/modules/gui/macosx/library/VLCLibraryWindow.m
@@ -122,6 +122,13 @@ static int ShowController(vlc_object_t *p_this, const char *psz_variable,
self.videoView = [[VLCVoutView alloc] initWithFrame:self.mainSplitView.frame];
self.videoView.hidden = YES;
+
+ [self.gridVsListSegmentedControl setToolTip: _NS("Grid View or List View")];
+ [self.librarySortButton setToolTip: _NS("Select Sorting Mode")];
+ [self.playQueueToggle setToolTip: _NS("Toggle Playqueue")];
+
+ [self.gridVsListSegmentedControl setHidden:NO];
+ [self.librarySortButton setHidden:NO];
self.videoView.translatesAutoresizingMaskIntoConstraints = NO;
[self.contentView addSubview:self.videoView];
[self.contentView addConstraint:[NSLayoutConstraint constraintWithItem:self.videoView attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:self.mainSplitView attribute:NSLayoutAttributeWidth multiplier:1. constant:1.]];
@@ -575,7 +582,8 @@ static int ShowController(vlc_object_t *p_this, const char *psz_variable,
[_audioLibraryView removeFromSuperviewWithoutNeedingDisplay];
[self.videoView setHidden:NO];
-
+ [self.gridVsListSegmentedControl setHidden:YES];
+ [self.librarySortButton setHidden:YES];
if (self.nativeFullscreenMode) {
if ([self hasActiveVideo] && [self fullscreen]) {
[self hideControlsBar];
@@ -610,6 +618,9 @@ static int ShowController(vlc_object_t *p_this, const char *psz_variable,
// restore alpha value to 1 for the case that macosx-opaqueness is set to < 1
[self setAlphaValue:1.0];
[self.videoView setHidden:YES];
+ [self.gridVsListSegmentedControl setHidden:NO];
+ [self.librarySortButton setHidden:NO];
+
[self segmentedControlAction:nil];
if (self.nativeFullscreenMode) {
More information about the vlc-commits
mailing list