[vlc-commits] [Git][videolan/vlc][master] 4 commits: macosx: Create and configure a blurred background for the play queue footer
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Tue Dec 2 05:40:55 UTC 2025
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
efb06cc7 by Claudio Cambra at 2025-12-02T06:19:10+01:00
macosx: Create and configure a blurred background for the play queue footer
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
8ee3a200 by Claudio Cambra at 2025-12-02T06:19:10+01:00
macosx: Add a glass effect for the play queue footer
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
9965547b by Claudio Cambra at 2025-12-02T06:19:10+01:00
macosx: Match positioning and sizing of play queue footer with the main library window playback controls bar
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
0aa98515 by Claudio Cambra at 2025-12-02T06:19:10+01:00
macosx: Add a gradient effect at the top of the play queue scroll view
Signed-off-by: Claudio Cambra <developer at claudiocambra.com>
- - - - -
3 changed files:
- modules/gui/macosx/UI/VLCLibraryWindowPlayQueueView.xib
- modules/gui/macosx/library/VLCLibraryWindowPlayQueueSidebarViewController.h
- modules/gui/macosx/library/VLCLibraryWindowPlayQueueSidebarViewController.m
Changes:
=====================================
modules/gui/macosx/UI/VLCLibraryWindowPlayQueueView.xib
=====================================
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="23504" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="24412" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
- <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="23504"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="24412"/>
<capability name="System colors introduced in macOS 10.14" minToolsVersion="10.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@@ -9,11 +9,18 @@
<customObject id="-2" userLabel="File's Owner" customClass="VLCLibraryWindowPlayQueueSidebarViewController">
<connections>
<outlet property="bottomButtonsSeparator" destination="ew3-Pn-diG" id="N5L-cw-953"/>
+ <outlet property="buttonStack" destination="hc5-GJ-yJe" id="cvF-K1-cq5"/>
<outlet property="clearButton" destination="aKS-lw-hfk" id="30D-7g-SnA"/>
<outlet property="dragDropImageBackgroundBox" destination="aUB-Ld-N2o" id="9xc-5h-uRF"/>
<outlet property="dragDropView" destination="grx-kk-1X1" id="b1W-Zw-a7Z"/>
+ <outlet property="footerContainerView" destination="ftr-ct-999" id="ftr-o1-999"/>
+ <outlet property="footerContainerViewDefaultBottomConstraint" destination="ftr-bot-999" id="y58-xy-3xa"/>
+ <outlet property="footerContainerViewLeadingConstraint" destination="ftr-lead-999" id="0qS-cp-cxI"/>
+ <outlet property="footerContainerViewTrailingConstraint" destination="ftr-trail-999" id="BCD-w4-CYV"/>
<outlet property="openMediaButton" destination="ghp-DI-YmZ" id="30J-m7-gLb"/>
<outlet property="repeatButton" destination="9xU-Ba-Hys" id="myS-5X-rgK"/>
+ <outlet property="scrollView" destination="EIb-Is-vco" id="9JX-Ba-BHj"/>
+ <outlet property="scrollViewDefaultBottomConstraint" destination="scr-bot-001" id="ndp-LY-vyP"/>
<outlet property="shuffleButton" destination="bdZ-N9-Noa" id="bJz-sR-lGW"/>
<outlet property="sortButton" destination="C02-6a-1Uw" id="kfR-K3-lce"/>
<outlet property="tableView" destination="Ubg-RS-LWE" id="ZiJ-ca-sOj"/>
@@ -24,14 +31,14 @@
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<customView identifier="VLCLibraryWindowPlayQueueSidebarIdentifier" id="NJR-gf-yTs">
- <rect key="frame" x="0.0" y="0.0" width="510" height="268"/>
+ <rect key="frame" x="0.0" y="0.0" width="510" height="261"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<box verticalHuggingPriority="751" boxType="separator" translatesAutoresizingMaskIntoConstraints="NO" id="ik5-L4-VLw">
- <rect key="frame" x="20" y="265" width="470" height="5"/>
+ <rect key="frame" x="20" y="258" width="470" height="5"/>
</box>
<scrollView borderType="none" autohidesScrollers="YES" horizontalLineScroll="18" horizontalPageScroll="10" verticalLineScroll="18" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EIb-Is-vco">
- <rect key="frame" x="0.0" y="57" width="510" height="210"/>
+ <rect key="frame" x="0.0" y="50" width="510" height="210"/>
<clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="20t-S6-IYS">
<rect key="frame" x="0.0" y="0.0" width="510" height="210"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -96,11 +103,99 @@
<autoresizingMask key="autoresizingMask"/>
</scroller>
</scrollView>
- <box verticalHuggingPriority="751" boxType="separator" translatesAutoresizingMaskIntoConstraints="NO" id="ew3-Pn-diG">
- <rect key="frame" x="20" y="54" width="470" height="5"/>
- </box>
+ <customView translatesAutoresizingMaskIntoConstraints="NO" id="ftr-ct-999">
+ <rect key="frame" x="0.0" y="0.0" width="510" height="50"/>
+ <subviews>
+ <box verticalHuggingPriority="751" boxType="separator" translatesAutoresizingMaskIntoConstraints="NO" id="ew3-Pn-diG">
+ <rect key="frame" x="20" y="47" width="470" height="5"/>
+ </box>
+ <stackView distribution="equalCentering" orientation="horizontal" alignment="centerY" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="hc5-GJ-yJe">
+ <rect key="frame" x="20" y="0.0" width="490" height="50"/>
+ <subviews>
+ <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="bdZ-N9-Noa">
+ <rect key="frame" x="0.0" y="13" width="24" height="24"/>
+ <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="shuffleOn" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="fpN-XQ-XkJ">
+ <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+ <font key="font" metaFont="system"/>
+ </buttonCell>
+ <constraints>
+ <constraint firstAttribute="width" constant="24" id="Dt6-9r-UXZ"/>
+ <constraint firstAttribute="height" constant="24" id="MPF-8Q-Oge"/>
+ </constraints>
+ <connections>
+ <action selector="shuffleAction:" target="-2" id="yht-Rc-8kq"/>
+ </connections>
+ </button>
+ <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="9xU-Ba-Hys">
+ <rect key="frame" x="155" y="13" width="24" height="24"/>
+ <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="repeatOff" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="CWu-CE-2fG">
+ <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+ <font key="font" metaFont="system"/>
+ </buttonCell>
+ <constraints>
+ <constraint firstAttribute="width" constant="24" id="LwI-Gs-9Ll"/>
+ <constraint firstAttribute="height" constant="24" id="oy4-Ke-bx1"/>
+ </constraints>
+ <connections>
+ <action selector="repeatAction:" target="-2" id="SNk-vw-LSL"/>
+ </connections>
+ </button>
+ <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="C02-6a-1Uw">
+ <rect key="frame" x="311" y="13" width="24" height="25"/>
+ <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="line.horizontal.3.decrease" catalog="system" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="Qsi-6S-0bG">
+ <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+ <font key="font" metaFont="system"/>
+ </buttonCell>
+ <constraints>
+ <constraint firstAttribute="height" constant="24" id="3rz-oE-rhS"/>
+ <constraint firstAttribute="width" constant="24" id="uLL-RT-XeW"/>
+ </constraints>
+ <connections>
+ <action selector="sortPlayQueue:" target="-2" id="BAl-CA-um5"/>
+ </connections>
+ </button>
+ <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="aKS-lw-hfk">
+ <rect key="frame" x="466" y="10" width="24.5" height="32"/>
+ <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="trash" catalog="system" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="DEr-Gg-n7Z">
+ <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+ <font key="font" metaFont="system"/>
+ </buttonCell>
+ <constraints>
+ <constraint firstAttribute="height" constant="24" id="TWi-ow-aoD"/>
+ <constraint firstAttribute="width" constant="24" id="bgh-Lr-Mae"/>
+ </constraints>
+ <connections>
+ <action selector="clearPlayQueue:" target="-2" id="DEh-0j-CpD"/>
+ </connections>
+ </button>
+ </subviews>
+ <visibilityPriorities>
+ <integer value="1000"/>
+ <integer value="1000"/>
+ <integer value="1000"/>
+ <integer value="1000"/>
+ </visibilityPriorities>
+ <customSpacing>
+ <real value="3.4028234663852886e+38"/>
+ <real value="3.4028234663852886e+38"/>
+ <real value="3.4028234663852886e+38"/>
+ <real value="3.4028234663852886e+38"/>
+ </customSpacing>
+ </stackView>
+ </subviews>
+ <constraints>
+ <constraint firstAttribute="bottom" secondItem="hc5-GJ-yJe" secondAttribute="bottom" id="0Wh-UN-tLi"/>
+ <constraint firstItem="hc5-GJ-yJe" firstAttribute="leading" secondItem="ftr-ct-999" secondAttribute="leading" constant="20" symbolic="YES" id="Saj-PQ-UQL"/>
+ <constraint firstAttribute="height" constant="50" id="ftr-h-001"/>
+ <constraint firstItem="ew3-Pn-diG" firstAttribute="leading" secondItem="ftr-ct-999" secondAttribute="leading" constant="20" id="ftr-l-001"/>
+ <constraint firstAttribute="trailing" secondItem="ew3-Pn-diG" secondAttribute="trailing" constant="20" id="ftr-t-001"/>
+ <constraint firstItem="ew3-Pn-diG" firstAttribute="top" secondItem="ftr-ct-999" secondAttribute="top" id="ftr-top-001"/>
+ <constraint firstAttribute="trailing" secondItem="hc5-GJ-yJe" secondAttribute="trailing" id="nNk-FA-MRz"/>
+ <constraint firstItem="hc5-GJ-yJe" firstAttribute="top" secondItem="ftr-ct-999" secondAttribute="top" id="pJc-3i-ul8"/>
+ </constraints>
+ </customView>
<customView hidden="YES" translatesAutoresizingMaskIntoConstraints="NO" id="grx-kk-1X1" customClass="VLCDragDropView">
- <rect key="frame" x="0.0" y="57" width="510" height="210"/>
+ <rect key="frame" x="0.0" y="50" width="510" height="210"/>
<subviews>
<box boxType="custom" borderType="line" borderWidth="0.0" cornerRadius="10" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="aUB-Ld-N2o">
<rect key="frame" x="188" y="38" width="134" height="134"/>
@@ -119,7 +214,7 @@
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="dropzone" id="AZ2-8e-Rrz"/>
</imageView>
<button wantsLayer="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ghp-DI-YmZ">
- <rect key="frame" x="196" y="1" width="119" height="32"/>
+ <rect key="frame" x="201" y="4" width="108" height="24"/>
<buttonCell key="cell" type="push" title="Open media..." bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="07D-yu-JVI">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
@@ -140,79 +235,6 @@
<constraint firstItem="qv6-Mn-ifA" firstAttribute="centerX" secondItem="grx-kk-1X1" secondAttribute="centerX" id="z8g-fU-cRw"/>
</constraints>
</customView>
- <stackView distribution="equalCentering" orientation="horizontal" alignment="top" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="hc5-GJ-yJe">
- <rect key="frame" x="20" y="16" width="470" height="24"/>
- <subviews>
- <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="bdZ-N9-Noa">
- <rect key="frame" x="0.0" y="0.0" width="24" height="24"/>
- <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="shuffleOn" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="fpN-XQ-XkJ">
- <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
- <font key="font" metaFont="system"/>
- </buttonCell>
- <constraints>
- <constraint firstAttribute="width" constant="24" id="Dt6-9r-UXZ"/>
- <constraint firstAttribute="height" constant="24" id="MPF-8Q-Oge"/>
- </constraints>
- <connections>
- <action selector="shuffleAction:" target="-2" id="yht-Rc-8kq"/>
- </connections>
- </button>
- <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="9xU-Ba-Hys">
- <rect key="frame" x="149" y="0.0" width="24" height="24"/>
- <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="repeatOff" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="CWu-CE-2fG">
- <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
- <font key="font" metaFont="system"/>
- </buttonCell>
- <constraints>
- <constraint firstAttribute="width" constant="24" id="LwI-Gs-9Ll"/>
- <constraint firstAttribute="height" constant="24" id="oy4-Ke-bx1"/>
- </constraints>
- <connections>
- <action selector="repeatAction:" target="-2" id="SNk-vw-LSL"/>
- </connections>
- </button>
- <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="C02-6a-1Uw">
- <rect key="frame" x="297" y="0.0" width="24" height="25"/>
- <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="line.horizontal.3.decrease" catalog="system" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="Qsi-6S-0bG">
- <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
- <font key="font" metaFont="system"/>
- </buttonCell>
- <constraints>
- <constraint firstAttribute="height" constant="24" id="3rz-oE-rhS"/>
- <constraint firstAttribute="width" constant="24" id="uLL-RT-XeW"/>
- </constraints>
- <connections>
- <action selector="sortPlayQueue:" target="-2" id="BAl-CA-um5"/>
- </connections>
- </button>
- <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="aKS-lw-hfk">
- <rect key="frame" x="446" y="-3" width="24.5" height="32"/>
- <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="trash" catalog="system" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="DEr-Gg-n7Z">
- <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
- <font key="font" metaFont="system"/>
- </buttonCell>
- <constraints>
- <constraint firstAttribute="height" constant="24" id="TWi-ow-aoD"/>
- <constraint firstAttribute="width" constant="24" id="bgh-Lr-Mae"/>
- </constraints>
- <connections>
- <action selector="clearPlayQueue:" target="-2" id="DEh-0j-CpD"/>
- </connections>
- </button>
- </subviews>
- <visibilityPriorities>
- <integer value="1000"/>
- <integer value="1000"/>
- <integer value="1000"/>
- <integer value="1000"/>
- </visibilityPriorities>
- <customSpacing>
- <real value="3.4028234663852886e+38"/>
- <real value="3.4028234663852886e+38"/>
- <real value="3.4028234663852886e+38"/>
- <real value="3.4028234663852886e+38"/>
- </customSpacing>
- </stackView>
</subviews>
<constraints>
<constraint firstItem="ik5-L4-VLw" firstAttribute="top" secondItem="NJR-gf-yTs" secondAttribute="top" id="1za-9j-6sD"/>
@@ -220,18 +242,15 @@
<constraint firstItem="grx-kk-1X1" firstAttribute="top" secondItem="ik5-L4-VLw" secondAttribute="bottom" id="AoR-Q7-XYJ"/>
<constraint firstItem="ik5-L4-VLw" firstAttribute="leading" secondItem="NJR-gf-yTs" secondAttribute="leading" constant="20" id="CW2-KK-Z5t"/>
<constraint firstItem="EIb-Is-vco" firstAttribute="top" secondItem="ik5-L4-VLw" secondAttribute="bottom" id="Cyw-MK-W8n"/>
- <constraint firstAttribute="trailing" secondItem="ew3-Pn-diG" secondAttribute="trailing" constant="20" id="Hwc-K8-2WQ"/>
<constraint firstAttribute="trailing" secondItem="EIb-Is-vco" secondAttribute="trailing" id="UAJ-gH-fWy"/>
- <constraint firstItem="hc5-GJ-yJe" firstAttribute="leading" secondItem="NJR-gf-yTs" secondAttribute="leading" constant="20" id="Ums-3j-iWc"/>
- <constraint firstAttribute="bottom" secondItem="hc5-GJ-yJe" secondAttribute="bottom" constant="16" id="XfY-Lh-mBE"/>
- <constraint firstAttribute="trailing" secondItem="hc5-GJ-yJe" secondAttribute="trailing" constant="20" id="chv-hJ-pjk"/>
<constraint firstAttribute="trailing" secondItem="ik5-L4-VLw" secondAttribute="trailing" constant="20" id="ef5-v1-Rm6"/>
- <constraint firstItem="hc5-GJ-yJe" firstAttribute="top" secondItem="ew3-Pn-diG" secondAttribute="bottom" constant="16" id="fcg-kI-gzS"/>
+ <constraint firstAttribute="bottom" secondItem="ftr-ct-999" secondAttribute="bottom" id="ftr-bot-999"/>
+ <constraint firstItem="ftr-ct-999" firstAttribute="leading" secondItem="NJR-gf-yTs" secondAttribute="leading" id="ftr-lead-999"/>
+ <constraint firstAttribute="trailing" secondItem="ftr-ct-999" secondAttribute="trailing" id="ftr-trail-999"/>
<constraint firstItem="ew3-Pn-diG" firstAttribute="top" secondItem="grx-kk-1X1" secondAttribute="bottom" id="haK-Qu-HJv"/>
<constraint firstItem="EIb-Is-vco" firstAttribute="leading" secondItem="NJR-gf-yTs" secondAttribute="leading" id="kEZ-5n-pxq"/>
<constraint firstItem="grx-kk-1X1" firstAttribute="leading" secondItem="NJR-gf-yTs" secondAttribute="leading" id="mCw-UE-mS0"/>
- <constraint firstItem="ew3-Pn-diG" firstAttribute="leading" secondItem="NJR-gf-yTs" secondAttribute="leading" constant="20" id="qow-FG-3aN"/>
- <constraint firstItem="EIb-Is-vco" firstAttribute="bottom" secondItem="ew3-Pn-diG" secondAttribute="top" id="y82-Wx-neg"/>
+ <constraint firstItem="EIb-Is-vco" firstAttribute="bottom" secondItem="ftr-ct-999" secondAttribute="top" id="scr-bot-001"/>
</constraints>
<point key="canvasLocation" x="-148" y="45"/>
</customView>
=====================================
modules/gui/macosx/library/VLCLibraryWindowPlayQueueSidebarViewController.h
=====================================
@@ -20,6 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+#include <AppKit/AppKit.h>
#import <Cocoa/Cocoa.h>
#import "VLCLibraryWindowAbstractSidebarViewController.h"
@@ -35,6 +36,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface VLCLibraryWindowPlayQueueSidebarViewController : VLCLibraryWindowAbstractSidebarViewController
@property (readwrite, weak) IBOutlet NSTableView *tableView;
+ at property (readwrite, weak) IBOutlet NSView *footerContainerView;
@property (readwrite, weak) IBOutlet VLCDragDropView *dragDropView;
@property (readwrite, weak) IBOutlet NSBox *dragDropImageBackgroundBox;
@property (readwrite, weak) IBOutlet NSButton *openMediaButton;
@@ -43,6 +45,12 @@ NS_ASSUME_NONNULL_BEGIN
@property (readwrite, weak) IBOutlet NSButton *shuffleButton;
@property (readwrite, weak) IBOutlet NSButton *sortButton;
@property (readwrite, weak) IBOutlet NSButton *clearButton;
+ at property (readwrite, weak) IBOutlet NSStackView *buttonStack;
+ at property (readwrite, weak) IBOutlet NSScrollView *scrollView;
+ at property (readwrite, weak) IBOutlet NSLayoutConstraint *footerContainerViewDefaultBottomConstraint;
+ at property (readwrite, weak) IBOutlet NSLayoutConstraint *footerContainerViewLeadingConstraint;
+ at property (readwrite, weak) IBOutlet NSLayoutConstraint *footerContainerViewTrailingConstraint;
+ at property (readwrite, weak) IBOutlet NSLayoutConstraint *scrollViewDefaultBottomConstraint;
@property (readwrite, nonatomic) NSTextField *counterLabel;
=====================================
modules/gui/macosx/library/VLCLibraryWindowPlayQueueSidebarViewController.m
=====================================
@@ -22,6 +22,8 @@
#import "VLCLibraryWindowPlayQueueSidebarViewController.h"
+#import <QuartzCore/QuartzCore.h>
+
#import "extensions/NSColor+VLCAdditions.h"
#import "extensions/NSFont+VLCAdditions.h"
#import "extensions/NSImage+VLCAdditions.h"
@@ -36,8 +38,12 @@
#import "views/VLCDragDropView.h"
#import "views/VLCRoundedCornerTextField.h"
#import "windows/VLCOpenWindowController.h"
+#import "extensions/NSView+VLCAdditions.h"
@implementation VLCLibraryWindowPlayQueueSidebarViewController
+{
+ CAGradientLayer *_scrollViewGradientMask;
+}
@synthesize counterLabel = _counterLabel;
@@ -87,6 +93,102 @@
selector:@selector(repeatStateUpdated:)
name:VLCPlaybackRepeatChanged
object:nil];
+
+ [self setupBlurredHeaderFooter];
+}
+
+- (void)setupScrollViewGradientMask
+{
+ const CGFloat gradientHeight = VLCLibraryUIUnits.mediumSpacing;
+
+ _scrollViewGradientMask = [CAGradientLayer layer];
+ _scrollViewGradientMask.colors = @[
+ (__bridge id)[NSColor colorWithWhite:1.0 alpha:0.0].CGColor,
+ (__bridge id)[NSColor colorWithWhite:1.0 alpha:1.0].CGColor
+ ];
+ _scrollViewGradientMask.startPoint = CGPointMake(0.5, 0.0);
+ _scrollViewGradientMask.endPoint = CGPointMake(0.5, 1.0);
+ _scrollViewGradientMask.locations = @[@0.0, @(gradientHeight / self.scrollView.bounds.size.height)];
+
+ self.scrollView.wantsLayer = YES;
+ self.scrollView.layer.mask = _scrollViewGradientMask;
+ _scrollViewGradientMask.frame = self.scrollView.bounds;
+
+ [NSNotificationCenter.defaultCenter addObserver:self
+ selector:@selector(scrollViewFrameDidChange:)
+ name:NSViewFrameDidChangeNotification
+ object:self.scrollView];
+}
+
+- (void)scrollViewFrameDidChange:(NSNotification *)notification
+{
+ if (!_scrollViewGradientMask) {
+ return;
+ }
+ _scrollViewGradientMask.frame = self.scrollView.bounds;
+}
+
+- (void)setupBlurredHeaderFooter
+{
+ const CGFloat footerHeight = self.footerContainerView.frame.size.height;
+ [self setupScrollViewGradientMask];
+
+ if (@available(macOS 26.0, *)) {
+#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 260000
+ [self.bottomButtonsSeparator removeFromSuperview];
+
+ NSGlassEffectView * const glassFooterView = [[NSGlassEffectView alloc] init];
+ glassFooterView.translatesAutoresizingMaskIntoConstraints = NO;
+ glassFooterView.contentView = self.buttonStack;
+ glassFooterView.cornerRadius = CGFLOAT_MAX;
+
+ self.footerContainerView.subviews = @[glassFooterView];
+ self.footerContainerView.clipsToBounds = NO;
+ [glassFooterView applyConstraintsToFillSuperview];
+
+ self.buttonStack.edgeInsets = NSEdgeInsetsMake(
+ VLCLibraryUIUnits.mediumSpacing,
+ VLCLibraryUIUnits.largeSpacing,
+ VLCLibraryUIUnits.mediumSpacing,
+ VLCLibraryUIUnits.largeSpacing
+ );
+
+ self.scrollViewDefaultBottomConstraint.active = NO;
+ self.footerContainerViewDefaultBottomConstraint.active = NO;
+ self.footerContainerViewLeadingConstraint.constant = VLCLibraryUIUnits.largeSpacing;
+ self.footerContainerViewTrailingConstraint.constant = VLCLibraryUIUnits.largeSpacing;
+
+ NSLayoutConstraint * const footerBottomConstraint =
+ [self.buttonStack.bottomAnchor constraintEqualToAnchor:self.view.bottomAnchor
+ constant:-VLCLibraryUIUnits.largeSpacing];
+
+ [NSLayoutConstraint activateConstraints:@[
+ [self.scrollView.bottomAnchor constraintEqualToAnchor:self.view.bottomAnchor],
+ footerBottomConstraint
+ ]];
+
+ const CGFloat footerTopLine = footerHeight + -footerBottomConstraint.constant + VLCLibraryUIUnits.smallSpacing;
+ self.scrollView.automaticallyAdjustsContentInsets = NO;
+ self.scrollView.contentInsets = NSEdgeInsetsMake(0, 0, footerTopLine, 0);
+#endif
+ } else if (@available(macOS 10.14, *)) {
+ NSVisualEffectView * const footerBlurView = [[NSVisualEffectView alloc] initWithFrame:self.footerContainerView.bounds];
+ footerBlurView.translatesAutoresizingMaskIntoConstraints = NO;
+ footerBlurView.material = NSVisualEffectMaterialHeaderView;
+ footerBlurView.blendingMode = NSVisualEffectBlendingModeWithinWindow;
+
+ [self.footerContainerView addSubview:footerBlurView];
+ [footerBlurView applyConstraintsToFillSuperview];
+
+ self.scrollViewDefaultBottomConstraint.active = NO;
+
+ [NSLayoutConstraint activateConstraints:@[
+ [self.scrollView.bottomAnchor constraintEqualToAnchor:self.footerContainerView.bottomAnchor]
+ ]];
+
+ self.scrollView.automaticallyAdjustsContentInsets = NO;
+ self.scrollView.contentInsets = NSEdgeInsetsMake(0, 0, footerHeight, 0);
+ }
}
- (NSString *)title
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/a0b766ecbfd057e907a2621d6f5ebdd697aeec8d...0aa985159e5d6c609085e62f302678f6805d2940
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/a0b766ecbfd057e907a2621d6f5ebdd697aeec8d...0aa985159e5d6c609085e62f302678f6805d2940
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