[vlc-commits] [Git][videolan/vlc][master] 4 commits: macosx: Correctly minimise control bar in VLCLibraryWindow
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sat Feb 11 05:06:11 UTC 2023
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
6714ba2f by Claudio Cambra at 2023-02-11T04:48:08+00:00
macosx: Correctly minimise control bar in VLCLibraryWindow
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
82896f88 by Claudio Cambra at 2023-02-11T04:48:08+00:00
macosx: Don't automatically show VLControlsBarCommon bottomBarView when time changes
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
7f3dcd43 by Claudio Cambra at 2023-02-11T04:48:08+00:00
macosx: Hide and show bottom controls bar in VLCLibraryWindow depending on player state changes
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
46e9fb37 by Claudio Cambra at 2023-02-11T04:48:08+00:00
macosx: Hide VLCLibraryWindow control bar on init
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
4 changed files:
- modules/gui/macosx/UI/VLCLibraryWindow.xib
- modules/gui/macosx/library/VLCLibraryWindow.h
- modules/gui/macosx/library/VLCLibraryWindow.m
- modules/gui/macosx/windows/mainwindow/VLCControlsBarCommon.m
Changes:
=====================================
modules/gui/macosx/UI/VLCLibraryWindow.xib
=====================================
@@ -577,6 +577,7 @@
</subviews>
<constraints>
<constraint firstItem="6gW-0d-ymm" firstAttribute="top" secondItem="u8g-jy-S4e" secondAttribute="top" id="33P-it-9HX"/>
+ <constraint firstAttribute="bottom" secondItem="u8g-jy-S4e" secondAttribute="bottom" priority="250" id="DQQ-ji-YSy"/>
<constraint firstItem="6gW-0d-ymm" firstAttribute="trailing" secondItem="iSp-bV-w6B" secondAttribute="trailing" id="DZK-gL-4Jh"/>
<constraint firstItem="vUy-jt-gjY" firstAttribute="top" secondItem="u8g-jy-S4e" secondAttribute="bottom" id="QH8-mU-6ZP"/>
<constraint firstItem="vUy-jt-gjY" firstAttribute="leading" secondItem="EiT-Mj-1SZ" secondAttribute="leading" id="Sse-bx-ewr"/>
@@ -770,6 +771,8 @@
<outlet property="segmentedTitleControlToolbarItem" destination="KnW-Lr-R1d" id="Wg1-Y2-34a"/>
<outlet property="shufflePlaylistButton" destination="jg5-33-vH0" id="FV2-36-3lG"/>
<outlet property="sortOrderToolbarItem" destination="Tbc-Ik-FaO" id="098-yp-97f"/>
+ <outlet property="splitViewBottomConstraintToBottomBar" destination="QH8-mU-6ZP" id="b0t-C0-N5t"/>
+ <outlet property="splitViewBottomConstraintToSuperView" destination="DQQ-ji-YSy" id="b0t-C0-5uP"/>
<outlet property="togglePlaylistToolbarItem" destination="Lf2-ec-tHh" id="gtf-cd-765"/>
<outlet property="upNextLabel" destination="TET-5r-zHx" id="3oI-LK-NDP"/>
<outlet property="upNextSeparator" destination="qmL-Ar-cj1" id="GRX-ZE-2UG"/>
=====================================
modules/gui/macosx/library/VLCLibraryWindow.h
=====================================
@@ -119,6 +119,8 @@ extern const NSUserInterfaceItemIdentifier VLCLibraryWindowIdentifier;
@property (readwrite, weak) IBOutlet NSToolbarItem *segmentedTitleControlToolbarItem;
@property (readwrite, weak) IBOutlet NSToolbarItem *librarySearchToolbarItem;
@property (readwrite, weak) IBOutlet NSToolbarItem *togglePlaylistToolbarItem;
+ at property (readwrite, weak) IBOutlet NSLayoutConstraint *splitViewBottomConstraintToBottomBar;
+ at property (readwrite, weak) IBOutlet NSLayoutConstraint *splitViewBottomConstraintToSuperView;
@property (nonatomic, readwrite, strong) IBOutlet NSView *emptyLibraryView;
@property (nonatomic, readwrite, strong) IBOutlet NSImageView *placeholderImageView;
=====================================
modules/gui/macosx/library/VLCLibraryWindow.m
=====================================
@@ -148,6 +148,7 @@ static void addShadow(NSImageView *__unsafe_unretained imageView)
self.videoView = [[VLCVoutView alloc] initWithFrame:self.mainSplitView.frame];
self.videoView.hidden = YES;
+ [self hideControlsBar];
[self.gridVsListSegmentedControl setToolTip: _NS("Grid View or List View")];
[self.librarySortButton setToolTip: _NS("Select Sorting Mode")];
@@ -802,11 +803,16 @@ static void addShadow(NSImageView *__unsafe_unretained imageView)
- (void)playerStateChanged:(NSNotification *)notification
{
- if(_playlistController.playerController.playerState != VLC_PLAYER_STATE_PLAYING) {
+ if (_playlistController.playerController.playerState == VLC_PLAYER_STATE_STOPPED) {
+ [self hideControlsBar];
return;
}
- [self reopenVideoView];
+ if(_playlistController.playerController.playerState == VLC_PLAYER_STATE_PLAYING) {
+ [self reopenVideoView];
+ }
+
+ [self showControlsBar];
}
// This handles reopening the video view when the user has closed it.
@@ -825,6 +831,21 @@ static void addShadow(NSImageView *__unsafe_unretained imageView)
[self enableVideoPlaybackAppearance];
}
+- (void)hideControlsBar
+{
+ [super hideControlsBar];
+ _splitViewBottomConstraintToBottomBar.priority = 1;
+ _splitViewBottomConstraintToSuperView.priority = 999;
+
+}
+
+- (void)showControlsBar
+{
+ [super showControlsBar];
+ _splitViewBottomConstraintToBottomBar.priority = 999;
+ _splitViewBottomConstraintToSuperView.priority = 1;
+}
+
- (void)presentVideoView
{
for (NSView *subview in _libraryTargetView.subviews) {
@@ -923,6 +944,7 @@ static void addShadow(NSImageView *__unsafe_unretained imageView)
- (void)shouldShowController:(NSNotification *)aNotification
{
[self makeKeyAndOrderFront:nil];
+ [self showControlsBar];
}
- (void)shouldShowFullscreenController:(NSNotification *)aNotification
=====================================
modules/gui/macosx/windows/mainwindow/VLCControlsBarCommon.m
=====================================
@@ -376,7 +376,6 @@
[self.timeSlider setHidden:NO];
[self.timeSlider setKnobHidden:NO];
[self.timeSlider setFloatValue:_playerController.position];
- [self.bottomBarView setHidden:NO];
vlc_tick_t duration = inputItem.duration;
bool buffering = _playerController.playerState == VLC_PLAYER_STATE_STARTED;
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/674cc68b264931069c7d0fb6843f1ac1d43765ee...46e9fb3737c1576a1897c83eb2855199cdb32226
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/674cc68b264931069c7d0fb6843f1ac1d43765ee...46e9fb3737c1576a1897c83eb2855199cdb32226
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