[vlc-commits] [Git][videolan/vlc][master] 2 commits: macosx: Fix height/visibility of drag/drop view in play queue sidebar
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sat Apr 11 02:44:11 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
753e6b96 by Claudio Cambra at 2026-04-11T02:23:05+00:00
macosx: Fix height/visibility of drag/drop view in play queue sidebar
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
989833b1 by Claudio Cambra at 2026-04-11T02:23:05+00:00
macosx: Allow dragdrop view to shrink when sidebar is vertically compressed
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
2 changed files:
- modules/gui/macosx/library/VLCLibraryWindowPlayQueueSidebarViewController.m
- modules/gui/macosx/library/VLCLibraryWindowSidebarRootViewController.m
Changes:
=====================================
modules/gui/macosx/library/VLCLibraryWindowPlayQueueSidebarViewController.m
=====================================
@@ -76,6 +76,30 @@
self.openMediaButton.title = _NS("Open media...");
self.dragDropImageBackgroundBox.fillColor = NSColor.VLClibrarySeparatorLightColor;
+ // Allow the drop zone image to shrink when the sidebar is contracted
+ for (NSView * const subview in self.dragDropView.subviews) {
+ if ([subview isKindOfClass:[VLCDropDisabledImageView class]]) {
+ for (NSLayoutConstraint * const constraint in subview.constraints) {
+ if (constraint.firstAttribute == NSLayoutAttributeWidth ||
+ constraint.firstAttribute == NSLayoutAttributeHeight) {
+ constraint.priority = NSLayoutPriorityDefaultLow;
+ }
+ }
+ [subview.widthAnchor constraintEqualToAnchor:subview.heightAnchor].active = YES;
+ [subview setContentCompressionResistancePriority:NSLayoutPriorityDefaultLow
+ forOrientation:NSLayoutConstraintOrientationHorizontal];
+ [subview setContentCompressionResistancePriority:NSLayoutPriorityDefaultLow
+ forOrientation:NSLayoutConstraintOrientationVertical];
+ break;
+ }
+ }
+ [self.dragDropImageBackgroundBox.topAnchor
+ constraintGreaterThanOrEqualToAnchor:self.dragDropView.topAnchor
+ constant:VLCLibraryUIUnits.smallSpacing].active = YES;
+ [self.dragDropView.bottomAnchor
+ constraintGreaterThanOrEqualToAnchor:self.openMediaButton.bottomAnchor
+ constant:VLCLibraryUIUnits.smallSpacing].active = YES;
+
self.shuffleButton.toolTip = _NS("Shuffle");
self.repeatButton.toolTip = _NS("Repeat");
self.sortButton.toolTip = _NS("Sort Play Queue");
@@ -162,12 +186,15 @@
[self.buttonStack.bottomAnchor constraintEqualToAnchor:self.view.bottomAnchor
constant:-VLCLibraryUIUnits.largeSpacing];
+ const CGFloat footerTopLine = footerHeight + -footerBottomConstraint.constant + VLCLibraryUIUnits.smallSpacing;
+
[NSLayoutConstraint activateConstraints:@[
[self.scrollView.bottomAnchor constraintEqualToAnchor:self.view.bottomAnchor],
+ [self.dragDropView.bottomAnchor constraintEqualToAnchor:self.view.bottomAnchor
+ constant:-footerTopLine],
footerBottomConstraint
]];
- const CGFloat footerTopLine = footerHeight + -footerBottomConstraint.constant + VLCLibraryUIUnits.smallSpacing;
self.scrollView.automaticallyAdjustsContentInsets = NO;
self.scrollView.contentInsets = NSEdgeInsetsMake(0, 0, footerTopLine, 0);
} else
=====================================
modules/gui/macosx/library/VLCLibraryWindowSidebarRootViewController.m
=====================================
@@ -173,7 +173,7 @@
self.topInternalConstraint.active = !self.viewSelector.hidden;
const NSLayoutPriority playQueueCompressionPriority =
- self.viewSelector.hidden ? NSLayoutPriorityDefaultLow : NSLayoutPriorityRequired;
+ self.viewSelector.hidden ? NSLayoutPriorityDefaultHigh : NSLayoutPriorityRequired;
self.playQueueHeaderLabel.hidden = chaptersEnabled;
[self.playQueueHeaderLabel setContentCompressionResistancePriority:playQueueCompressionPriority
forOrientation:NSLayoutConstraintOrientationVertical];
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/6cb24ebef79fb307e1b40e3887b0fd90586fdedb...989833b12041588fd41d671c463da2a2718324d3
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/6cb24ebef79fb307e1b40e3887b0fd90586fdedb...989833b12041588fd41d671c463da2a2718324d3
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list