Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
c5f6cdbe by Claudio Cambra at 2026-02-24T11:03:50+01:00
macosx: Extract application of constraints for audio group table header view

Signed-off-by: Claudio Cambra <[email protected]>

- - - - -
bd886f12 by Claudio Cambra at 2026-02-24T11:03:50+01:00
macosx: Add property to selectively apply internal padding within audio group 
table header view

Signed-off-by: Claudio Cambra <[email protected]>

- - - - -
56c45f27 by Claudio Cambra at 2026-02-24T11:03:50+01:00
macosx: Add initialiser to audio group table header view to initialise with 
internal padding value

Signed-off-by: Claudio Cambra <[email protected]>

- - - - -
5db64f2e by Claudio Cambra at 2026-02-24T11:03:50+01:00
macosx: Ensure the audio group table header root view has no visible background

Signed-off-by: Claudio Cambra <[email protected]>

- - - - -
bd37a19f by Claudio Cambra at 2026-02-24T11:03:50+01:00
macosx: Use the table header view for the audio group collection views

Signed-off-by: Claudio Cambra <[email protected]>

- - - - -
c8a5818c by Claudio Cambra at 2026-02-24T11:03:50+01:00
macosx: Remove VLCLibraryAudioGroupHeaderView

Signed-off-by: Claudio Cambra <[email protected]>

- - - - -


9 changed files:

- extras/package/macosx/VLC.xcodeproj/project.pbxproj
- modules/gui/macosx/Makefile.am
- − modules/gui/macosx/UI/VLCLibraryAudioGroupHeaderView.xib
- modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupDataSource.m
- − modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupHeaderView.h
- − modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupHeaderView.m
- modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupTableHeaderView.h
- modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupTableHeaderView.m
- modules/gui/macosx/library/audio-library/VLCLibraryAudioViewController.m


Changes:

=====================================
extras/package/macosx/VLC.xcodeproj/project.pbxproj
=====================================
@@ -134,7 +134,6 @@
                537BD6892C59392300446ED0 /* VLCLibraryGroupsDataSource.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 537BD6882C59392300446ED0 /* 
VLCLibraryGroupsDataSource.m */; };
                5387FFF52A15127100A3A70A /* NSWindow+VLCAdditions.m in Sources 
*/ = {isa = PBXBuildFile; fileRef = 5387FFF42A15127100A3A70A /* 
NSWindow+VLCAdditions.m */; };
                538A7EDA29A63EE40068AD4F /* VLCFullVideoViewWindow.m in Sources 
*/ = {isa = PBXBuildFile; fileRef = 538A7ED929A63EE40068AD4F /* 
VLCFullVideoViewWindow.m */; };
-               538DC4E32A6B69B50082DECD /* VLCLibraryAudioGroupHeaderView.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 538DC4E22A6B69B50082DECD /* 
VLCLibraryAudioGroupHeaderView.m */; };
                53903D3A29576ED500D0B308 /* VLCLibraryAudioGroupDataSource.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 53903D3929576ED500D0B308 /* 
VLCLibraryAudioGroupDataSource.m */; };
                539668872D37B483005CD9D4 /* 
VLCLibraryMediaSourceViewNavigationStack.m in Sources */ = {isa = PBXBuildFile; 
fileRef = 539668842D37B483005CD9D4 /* 
VLCLibraryMediaSourceViewNavigationStack.m */; };
                539668882D37B483005CD9D4 /* 
VLCLibraryMediaSourceViewNavigationState.m in Sources */ = {isa = PBXBuildFile; 
fileRef = 539668862D37B483005CD9D4 /* 
VLCLibraryMediaSourceViewNavigationState.m */; };
@@ -439,8 +438,6 @@
                5387FFF42A15127100A3A70A /* NSWindow+VLCAdditions.m */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = 
"NSWindow+VLCAdditions.m"; sourceTree = "<group>"; };
                538A7ED829A63EE40068AD4F /* VLCFullVideoViewWindow.h */ = {isa 
= PBXFileReference; lastKnownFileType = sourcecode.c.h; path = 
VLCFullVideoViewWindow.h; sourceTree = "<group>"; };
                538A7ED929A63EE40068AD4F /* VLCFullVideoViewWindow.m */ = {isa 
= PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = 
VLCFullVideoViewWindow.m; sourceTree = "<group>"; };
-               538DC4E22A6B69B50082DECD /* VLCLibraryAudioGroupHeaderView.m */ 
= {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = 
VLCLibraryAudioGroupHeaderView.m; sourceTree = "<group>"; };
-               538DC4E42A6B69C00082DECD /* VLCLibraryAudioGroupHeaderView.h */ 
= {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.h; path = VLCLibraryAudioGroupHeaderView.h; sourceTree = 
"<group>"; };
                53903D3829576ED500D0B308 /* VLCLibraryAudioGroupDataSource.h */ 
= {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = 
VLCLibraryAudioGroupDataSource.h; sourceTree = "<group>"; };
                53903D3929576ED500D0B308 /* VLCLibraryAudioGroupDataSource.m */ 
= {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = 
VLCLibraryAudioGroupDataSource.m; sourceTree = "<group>"; };
                5390E0E52CE0AC3C00A4FC4A /* VLCLibraryHomeViewActionsView.xib 
*/ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = 
VLCLibraryHomeViewActionsView.xib; sourceTree = "<group>"; };
@@ -477,7 +474,6 @@
                53B447F4293BB47A00857588 /* VLCLibraryVideoGroupDescriptor.m */ 
= {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; path = VLCLibraryVideoGroupDescriptor.m; sourceTree = 
"<group>"; };
                53BDE19D2D5C8D1C00254560 /* VLCMediaLibraryFolderObserver.h */ 
= {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = 
VLCMediaLibraryFolderObserver.h; sourceTree = "<group>"; };
                53BDE19E2D5C8D1C00254560 /* VLCMediaLibraryFolderObserver.m */ 
= {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = 
VLCMediaLibraryFolderObserver.m; sourceTree = "<group>"; };
-               53BFB1E02A6A72160065EA7A /* VLCLibraryAudioGroupHeaderView.xib 
*/ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = 
VLCLibraryAudioGroupHeaderView.xib; sourceTree = "<group>"; };
                53C1EF842B466B13001AEEF5 /* VLCLibraryHomeViewContainerView.h 
*/ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.h; path = VLCLibraryHomeViewContainerView.h; sourceTree = 
"<group>"; };
                53C1EF852B466B13001AEEF5 /* 
VLCLibraryHomeViewVideoGridContainerView.m */ = {isa = PBXFileReference; 
fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = 
VLCLibraryHomeViewVideoGridContainerView.m; sourceTree = "<group>"; };
                53C1EF862B466B13001AEEF5 /* 
VLCLibraryHomeViewStackViewController.m */ = {isa = PBXFileReference; 
fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = 
VLCLibraryHomeViewStackViewController.m; sourceTree = "<group>"; };
@@ -1644,8 +1640,6 @@
                5325C5742930026600B2B63A /* audio-library */ = {
                        isa = PBXGroup;
                        children = (
-                               538DC4E42A6B69C00082DECD /* 
VLCLibraryAudioGroupHeaderView.h */,
-                               538DC4E22A6B69B50082DECD /* 
VLCLibraryAudioGroupHeaderView.m */,
                                5325C57C29302E6800B2B63A /* 
VLCLibraryAudioViewController.h */,
                                5325C57B29302E6800B2B63A /* 
VLCLibraryAudioViewController.m */,
                                7DE82E7722843781002D341A /* 
VLCLibraryAlbumTableCellView.h */,
@@ -2178,7 +2172,6 @@
                                6B82240B1E4D2A9000833BE1 /* 
VLCInformationWindow.xib */,
                                539F116A29F9756000F13460 /* 
VLCMainVideoViewAudioMediaDecorativeView.xib */,
                                7DE82E7A228437AA002D341A /* 
VLCLibraryAlbumTableCellView.xib */,
-                               53BFB1E02A6A72160065EA7A /* 
VLCLibraryAudioGroupHeaderView.xib */,
                                53088E122AD6EADF00C21358 /* 
VLCLibraryCarouselViewItemView.xib */,
                                536283FD2911476A00640C15 /* 
VLCLibraryCollectionViewMediaItemListSupplementaryDetailView.xib */,
                                536283FB2911476A00640C15 /* 
VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.xib */,
@@ -2474,7 +2467,6 @@
                                533B5D2C29CF94C6003DE887 /* 
VLCBookmarksTableViewDataSource.m in Sources */,
                                1C3113D31E508C6900D4DD76 /* 
VLCResumeDialogController.m in Sources */,
                                7D2FFA40227B8A5B0085D649 /* 
VLCLinearProgressIndicator.m in Sources */,
-                               538DC4E32A6B69B50082DECD /* 
VLCLibraryAudioGroupHeaderView.m in Sources */,
                                53E5112B2E1ADA9F0048CEFC /* 
VLCLibraryFavoritesDataSource.m in Sources */,
                                7DFBDCB1226A518400B700A5 /* 
VLCLibraryMenuController.m in Sources */,
                                536283F8291146BC00640C15 /* 
VLCLibrarySongTableCellView.m in Sources */,


=====================================
modules/gui/macosx/Makefile.am
=====================================
@@ -282,8 +282,6 @@ libmacosx_plugin_la_SOURCES = \
        gui/macosx/library/audio-library/VLCLibraryAudioDataSource.m \
        gui/macosx/library/audio-library/VLCLibraryAudioGroupDataSource.h \
        gui/macosx/library/audio-library/VLCLibraryAudioGroupDataSource.m \
-       gui/macosx/library/audio-library/VLCLibraryAudioGroupHeaderView.h \
-       gui/macosx/library/audio-library/VLCLibraryAudioGroupHeaderView.m \
        gui/macosx/library/audio-library/VLCLibraryAudioGroupTableHeaderCell.h \
        gui/macosx/library/audio-library/VLCLibraryAudioGroupTableHeaderCell.m \
        gui/macosx/library/audio-library/VLCLibraryAudioGroupTableHeaderView.h \
@@ -552,7 +550,6 @@ libmacosx_plugin_la_XIB_SOURCES = \
        gui/macosx/UI/VLCCustomCropARPanel.xib \
        gui/macosx/UI/VLCDetachedAudioWindow.xib \
        gui/macosx/UI/VLCLibraryAlbumTableCellView.xib \
-       gui/macosx/UI/VLCLibraryAudioGroupHeaderView.xib \
        gui/macosx/UI/VLCLibraryWindow.xib \
        gui/macosx/UI/VLCLibraryWindowChaptersView.xib \
        gui/macosx/UI/VLCLibraryWindowNavigationSidebarView.xib \


=====================================
modules/gui/macosx/UI/VLCLibraryAudioGroupHeaderView.xib deleted
=====================================
@@ -1,136 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" 
toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" 
useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" 
version="22505"/>
-        <capability name="Named colors" minToolsVersion="9.0"/>
-        <capability name="documents saved in the Xcode 8 format" 
minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner"/>
-        <customObject id="-1" userLabel="First Responder" 
customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView wantsLayer="YES" 
translatesAutoresizingMaskIntoConstraints="NO" id="E6K-GD-bgu" 
customClass="VLCLibraryAudioGroupHeaderView">
-            <rect key="frame" x="0.0" y="0.0" width="730" height="86"/>
-            <subviews>
-                <visualEffectView blendingMode="withinWindow" 
material="headerView" state="followsWindowActiveState" 
translatesAutoresizingMaskIntoConstraints="NO" id="f5b-qJ-770">
-                    <rect key="frame" x="0.0" y="0.0" width="730" height="86"/>
-                </visualEffectView>
-                <stackView distribution="fill" orientation="vertical" 
alignment="leading" spacing="10" 
horizontalStackHuggingPriority="249.99998474121094" 
verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" 
translatesAutoresizingMaskIntoConstraints="NO" id="0Si-IF-hfH">
-                    <rect key="frame" x="10" y="10" width="710" height="66"/>
-                    <subviews>
-                        <customView verticalHuggingPriority="1000" 
translatesAutoresizingMaskIntoConstraints="NO" id="Yyj-ln-1hz">
-                            <rect key="frame" x="0.0" y="26" width="710" 
height="40"/>
-                            <subviews>
-                                <textField focusRingType="none" 
horizontalHuggingPriority="251" verticalHuggingPriority="750" 
translatesAutoresizingMaskIntoConstraints="NO" id="VGp-RV-Jl4">
-                                    <rect key="frame" x="-2" y="6" width="144" 
height="28"/>
-                                    <textFieldCell key="cell" 
lineBreakMode="truncatingTail" title="Audio Group" id="96R-yZ-Dap">
-                                        <font key="font" metaFont="systemBold" 
size="24"/>
-                                        <color key="textColor" 
name="labelColor" catalog="System" colorSpace="catalog"/>
-                                        <color key="backgroundColor" 
name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                    </textFieldCell>
-                                </textField>
-                                <stackView distribution="fill" 
orientation="horizontal" alignment="top" spacing="5" 
horizontalStackHuggingPriority="249.99998474121094" 
verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" 
translatesAutoresizingMaskIntoConstraints="NO" id="eE7-fJ-MtS">
-                                    <rect key="frame" x="553" y="6" 
width="157" height="28"/>
-                                    <subviews>
-                                        <button verticalHuggingPriority="750" 
translatesAutoresizingMaskIntoConstraints="NO" id="UDD-gH-RDW">
-                                            <rect key="frame" x="-6" y="-6" 
width="88" height="40"/>
-                                            <buttonCell key="cell" type="push" 
title="Play" bezelStyle="rounded" image="play.fill" catalog="system" 
imagePosition="leading" alignment="center" controlSize="large" 
borderStyle="border" imageScaling="proportionallyDown" inset="2" 
id="1xa-VB-LBX">
-                                                <behavior key="behavior" 
pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                                <font key="font" 
metaFont="system"/>
-                                            </buttonCell>
-                                            <color key="bezelColor" 
name="VLCAccentColor"/>
-                                            <connections>
-                                                <action selector="play:" 
target="E6K-GD-bgu" id="vp4-Ar-psi"/>
-                                            </connections>
-                                        </button>
-                                        <button verticalHuggingPriority="750" 
translatesAutoresizingMaskIntoConstraints="NO" id="Baf-bX-D7M">
-                                            <rect key="frame" x="75" y="-6" 
width="88" height="40"/>
-                                            <buttonCell key="cell" type="push" 
title="Queue" bezelStyle="rounded" image="NSAddTemplate" 
imagePosition="leading" alignment="center" controlSize="large" 
borderStyle="border" imageScaling="proportionallyDown" inset="2" 
id="hql-tL-GoL">
-                                                <behavior key="behavior" 
pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                                <font key="font" 
metaFont="system"/>
-                                            </buttonCell>
-                                            <connections>
-                                                <action selector="enqueue:" 
target="E6K-GD-bgu" id="MmL-OA-W6A"/>
-                                            </connections>
-                                        </button>
-                                    </subviews>
-                                    <constraints>
-                                        <constraint firstItem="UDD-gH-RDW" 
firstAttribute="centerY" secondItem="eE7-fJ-MtS" secondAttribute="centerY" 
id="7pl-Xu-lre"/>
-                                        <constraint firstItem="Baf-bX-D7M" 
firstAttribute="centerY" secondItem="eE7-fJ-MtS" secondAttribute="centerY" 
id="AMr-ZS-8Ot"/>
-                                        <constraint firstItem="UDD-gH-RDW" 
firstAttribute="width" secondItem="Baf-bX-D7M" secondAttribute="width" 
id="N5Y-W0-Y5P"/>
-                                    </constraints>
-                                    <visibilityPriorities>
-                                        <integer value="1000"/>
-                                        <integer value="1000"/>
-                                    </visibilityPriorities>
-                                    <customSpacing>
-                                        <real value="3.4028234663852886e+38"/>
-                                        <real value="3.4028234663852886e+38"/>
-                                    </customSpacing>
-                                </stackView>
-                            </subviews>
-                            <constraints>
-                                <constraint firstAttribute="trailing" 
secondItem="eE7-fJ-MtS" secondAttribute="trailing" id="Ko4-Yr-Zzj"/>
-                                <constraint firstItem="VGp-RV-Jl4" 
firstAttribute="leading" secondItem="Yyj-ln-1hz" secondAttribute="leading" 
id="Oed-yO-cxQ"/>
-                                <constraint firstAttribute="height" 
constant="40" id="UZ9-lj-BXD"/>
-                                <constraint firstItem="eE7-fJ-MtS" 
firstAttribute="centerY" secondItem="Yyj-ln-1hz" secondAttribute="centerY" 
id="XWb-3l-7qH"/>
-                                <constraint firstItem="VGp-RV-Jl4" 
firstAttribute="centerY" secondItem="Yyj-ln-1hz" secondAttribute="centerY" 
id="fgu-OU-KwU"/>
-                                <constraint firstItem="eE7-fJ-MtS" 
firstAttribute="leading" relation="greaterThanOrEqual" secondItem="VGp-RV-Jl4" 
secondAttribute="trailing" constant="10" id="fsv-ju-hNO"/>
-                            </constraints>
-                        </customView>
-                        <textField focusRingType="none" 
horizontalHuggingPriority="251" verticalHuggingPriority="750" 
translatesAutoresizingMaskIntoConstraints="NO" id="8Fd-yT-2AG">
-                            <rect key="frame" x="-2" y="0.0" width="714" 
height="16"/>
-                            <textFieldCell key="cell" lineBreakMode="clipping" 
title="0 albums, 0 songs" id="Tmx-ap-c2a">
-                                <font key="font" usesAppearanceFont="YES"/>
-                                <color key="textColor" name="labelColor" 
catalog="System" colorSpace="catalog"/>
-                                <color key="backgroundColor" 
name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                            </textFieldCell>
-                        </textField>
-                    </subviews>
-                    <constraints>
-                        <constraint firstAttribute="bottom" 
secondItem="8Fd-yT-2AG" secondAttribute="bottom" constant="10" id="8tG-XA-Dhe"/>
-                        <constraint firstItem="Yyj-ln-1hz" 
firstAttribute="leading" secondItem="0Si-IF-hfH" secondAttribute="leading" 
constant="10" id="Ci0-Wg-TUY"/>
-                        <constraint firstItem="8Fd-yT-2AG" 
firstAttribute="leading" secondItem="0Si-IF-hfH" secondAttribute="leading" 
constant="10" id="Kyd-AH-vSN"/>
-                        <constraint firstAttribute="trailing" 
secondItem="Yyj-ln-1hz" secondAttribute="trailing" constant="10" 
id="LeP-os-gHu"/>
-                        <constraint firstItem="Yyj-ln-1hz" 
firstAttribute="top" secondItem="0Si-IF-hfH" secondAttribute="top" 
constant="10" id="VPw-ku-aor"/>
-                        <constraint firstAttribute="trailing" 
secondItem="8Fd-yT-2AG" secondAttribute="trailing" constant="10" 
id="VyH-Uu-36X"/>
-                    </constraints>
-                    <visibilityPriorities>
-                        <integer value="1000"/>
-                        <integer value="1000"/>
-                    </visibilityPriorities>
-                    <customSpacing>
-                        <real value="3.4028234663852886e+38"/>
-                        <real value="3.4028234663852886e+38"/>
-                    </customSpacing>
-                </stackView>
-            </subviews>
-            <constraints>
-                <constraint firstAttribute="bottom" secondItem="f5b-qJ-770" 
secondAttribute="bottom" id="CMu-pV-oNq"/>
-                <constraint firstItem="f5b-qJ-770" firstAttribute="leading" 
secondItem="E6K-GD-bgu" secondAttribute="leading" id="Enr-0y-OWJ"/>
-                <constraint firstItem="f5b-qJ-770" firstAttribute="top" 
secondItem="E6K-GD-bgu" secondAttribute="top" id="UDS-Of-f99"/>
-                <constraint firstItem="0Si-IF-hfH" firstAttribute="top" 
secondItem="E6K-GD-bgu" secondAttribute="top" id="fw0-cv-Ofa"/>
-                <constraint firstAttribute="trailing" secondItem="0Si-IF-hfH" 
secondAttribute="trailing" id="mM3-Iy-sSh"/>
-                <constraint firstAttribute="trailing" secondItem="f5b-qJ-770" 
secondAttribute="trailing" id="qxE-XE-VRb"/>
-                <constraint firstAttribute="bottom" secondItem="0Si-IF-hfH" 
secondAttribute="bottom" id="sUV-bu-8ug"/>
-                <constraint firstItem="0Si-IF-hfH" firstAttribute="leading" 
secondItem="E6K-GD-bgu" secondAttribute="leading" id="vM8-9F-b9Q"/>
-            </constraints>
-            <connections>
-                <outlet property="backgroundEffectView" 
destination="f5b-qJ-770" id="ASu-7B-UGN"/>
-                <outlet property="detailTextField" destination="8Fd-yT-2AG" 
id="VVh-Xd-Ma1"/>
-                <outlet property="playButton" destination="UDD-gH-RDW" 
id="Cvj-Zy-lA5"/>
-                <outlet property="queueButton" destination="Baf-bX-D7M" 
id="LXJ-9K-2zU"/>
-                <outlet property="stackView" destination="0Si-IF-hfH" 
id="QDA-wu-RRB"/>
-                <outlet property="titleTextField" destination="VGp-RV-Jl4" 
id="G9K-eO-d5s"/>
-            </connections>
-            <point key="canvasLocation" x="-588" y="-314"/>
-        </customView>
-    </objects>
-    <resources>
-        <image name="NSAddTemplate" width="18" height="17"/>
-        <image name="play.fill" catalog="system" width="12" height="13"/>
-        <namedColor name="VLCAccentColor">
-            <color red="1" green="0.37999999523162842" 
blue="0.039999999105930328" alpha="1" colorSpace="custom" 
customColorSpace="sRGB"/>
-        </namedColor>
-    </resources>
-</document>


=====================================
modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupDataSource.m
=====================================
@@ -36,7 +36,7 @@
 #import "library/VLCLibraryWindow.h"
 
 #import "library/audio-library/VLCLibraryAlbumTableCellView.h"
-#import "library/audio-library/VLCLibraryAudioGroupHeaderView.h"
+#import "library/audio-library/VLCLibraryAudioGroupTableHeaderView.h"
 
 #import "views/VLCSubScrollView.h"
 
@@ -54,11 +54,9 @@
 
 + (void)setupCollectionView:(NSCollectionView *)collectionView
 {
-    NSNib * const audioGroupHeaderView = [[NSNib alloc] 
initWithNibNamed:@"VLCLibraryAudioGroupHeaderView"
-                                                                  bundle:nil];
-    [collectionView registerNib:audioGroupHeaderView
-     forSupplementaryViewOfKind:NSCollectionElementKindSectionHeader
-                 withIdentifier:VLCLibraryAudioGroupHeaderViewIdentifier];
+    [collectionView registerClass:VLCLibraryAudioGroupTableHeaderView.class
+       forSupplementaryViewOfKind:NSCollectionElementKindSectionHeader
+                   
withIdentifier:VLCLibraryAudioGroupTableHeaderViewIdentifier];
 }
 
 - (instancetype)init
@@ -391,7 +389,7 @@ 
viewForSupplementaryElementOfKind:(NSCollectionViewSupplementaryElementKind)kind
         return albumSupplementaryDetailView;
 
     } else if ([kind isEqualToString:NSCollectionElementKindSectionHeader]) {
-        VLCLibraryAudioGroupHeaderView * const headerView = [collectionView 
makeSupplementaryViewOfKind:kind 
withIdentifier:VLCLibraryAudioGroupHeaderViewIdentifier forIndexPath:indexPath];
+        VLCLibraryAudioGroupTableHeaderView * const headerView = 
[collectionView makeSupplementaryViewOfKind:kind 
withIdentifier:VLCLibraryAudioGroupTableHeaderViewIdentifier 
forIndexPath:indexPath];
 
         VLCLibraryRepresentedItem * const representedItem = 
[[VLCLibraryRepresentedItem alloc] initWithItem:_representedAudioGroup 
parentType:_currentParentType];
         headerView.representedItem = representedItem;


=====================================
modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupHeaderView.h 
deleted
=====================================
@@ -1,50 +0,0 @@
-/*****************************************************************************
- * VLCLibraryAudioGroupHeaderView.h: MacOS X interface module
- *****************************************************************************
- * Copyright (C) 2023 VLC authors and VideoLAN
- *
- * Authors: Claudio Cambra <[email protected]>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, 
USA.
- *****************************************************************************/
-
-#import <Cocoa/Cocoa.h>
-
-NS_ASSUME_NONNULL_BEGIN
-
-@class VLCLibraryRepresentedItem;
-@protocol VLCMediaLibraryAudioGroupProtocol;
-
-extern NSString * const VLCLibraryAudioGroupHeaderViewIdentifier;
-
-@interface VLCLibraryAudioGroupHeaderView : NSView
-
-@property (class, readonly) const CGSize defaultHeaderSize;
-
-@property (readwrite, retain, nonatomic) VLCLibraryRepresentedItem 
*representedItem;
-
-@property (readwrite, weak) IBOutlet NSStackView *stackView;
-@property (readwrite, weak) IBOutlet NSTextField *titleTextField;
-@property (readwrite, weak) IBOutlet NSTextField *detailTextField;
-@property (readwrite, weak) IBOutlet NSButton *playButton;
-@property (readwrite, weak) IBOutlet NSButton *queueButton;
-@property (readwrite, weak) IBOutlet NSVisualEffectView *backgroundEffectView;
-
-- (IBAction)play:(id)sender;
-- (IBAction)enqueue:(id)sender;
-
-@end
-
-NS_ASSUME_NONNULL_END


=====================================
modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupHeaderView.m 
deleted
=====================================
@@ -1,150 +0,0 @@
-/*****************************************************************************
- * VLCLibraryAudioGroupHeaderView.m: MacOS X interface module
- *****************************************************************************
- * Copyright (C) 2023 VLC authors and VideoLAN
- *
- * Authors: Claudio Cambra <[email protected]>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, 
USA.
- *****************************************************************************/
-
-#import "VLCLibraryAudioGroupHeaderView.h"
-
-#import "extensions/NSColor+VLCAdditions.h"
-#import "extensions/NSString+Helpers.h"
-#import "extensions/NSView+VLCAdditions.h"
-
-#import "main/VLCMain.h"
-
-#import "library/VLCLibraryController.h"
-#import "library/VLCLibraryDataTypes.h"
-#import "library/VLCLibraryRepresentedItem.h"
-#import "library/VLCLibraryUIUnits.h"
-
-NSString * const VLCLibraryAudioGroupHeaderViewIdentifier = 
@"VLCLibraryAudioGroupHeaderViewIdentifier";
-
-@interface VLCLibraryAudioGroupHeaderView ()
-
-#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 260000
-@property NSGlassEffectView *glassBackgroundView API_AVAILABLE(macos(26.0));
-#endif
-
-@end
-
-@implementation VLCLibraryAudioGroupHeaderView
-
-+ (CGSize)defaultHeaderSize
-{
-    return CGSizeMake(690., 86.);
-}
-
-- (void)awakeFromNib
-{
-    [super awakeFromNib];
-
-    if (@available(macOS 10.14, *))
-        _playButton.bezelColor = NSColor.VLCAccentColor;
-
-    if (@available(macOS 26.0, *)) {
-#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 260000
-        self.glassBackgroundView = [[NSGlassEffectView alloc] 
initWithFrame:self.backgroundEffectView.frame];
-        self.glassBackgroundView.translatesAutoresizingMaskIntoConstraints = 
NO;
-
-        [self addSubview:self.glassBackgroundView
-              positioned:NSWindowBelow
-              relativeTo:self.backgroundEffectView];
-        [self.glassBackgroundView applyConstraintsToFillSuperview];
-        [self.backgroundEffectView removeFromSuperview];
-        [self.stackView removeFromSuperview];
-        self.glassBackgroundView.contentView = self.stackView;
-#endif
-    } else {
-        if (@available(macOS 10.14, *)) {
-            [NSApplication.sharedApplication addObserver:self
-                                            forKeyPath:@"effectiveAppearance"
-                                                
options:NSKeyValueObservingOptionNew
-                                                context:nil];
-        }
-        self.backgroundEffectView.wantsLayer = YES;
-        self.backgroundEffectView.layer.cornerRadius = 
VLCLibraryUIUnits.smallSpacing;
-        self.backgroundEffectView.layer.borderWidth = 
VLCLibraryUIUnits.borderThickness;
-        [self updateColoredAppearance:self.effectiveAppearance];
-    }
-}
-
-- (void)observeValueForKeyPath:(NSString *)keyPath
-                      ofObject:(id)object
-                        change:(NSDictionary<NSKeyValueChangeKey,id> *)change
-                       context:(void *)context
-{
-    if (@available(macOS 26.0, *)) {
-        return;
-    } else if ([keyPath isEqualToString:@"effectiveAppearance"]) {
-        NSAppearance * const effectiveAppearance = 
change[NSKeyValueChangeNewKey];
-        [self updateColoredAppearance:effectiveAppearance];
-    }
-}
-
-- (void)updateColoredAppearance:(NSAppearance *)appearance
-{
-    if (@available(macOS 26.0, *))
-        return;
-
-    NSParameterAssert(appearance);
-    BOOL isDark = NO;
-    if (@available(macOS 10.14, *)) {
-        isDark = [appearance.name isEqualToString:NSAppearanceNameDarkAqua] || 
-                 [appearance.name isEqualToString:NSAppearanceNameVibrantDark];
-    }
-
-    self.backgroundEffectView.layer.borderColor = isDark ?
-        NSColor.VLCDarkSubtleBorderColor.CGColor : 
NSColor.VLCLightSubtleBorderColor.CGColor;
-}
-
-
-- (void)updateRepresentation
-{
-    const id<VLCMediaLibraryItemProtocol> actualItem = 
self.representedItem.item;
-    if (actualItem == nil) {
-        _titleTextField.stringValue = _NS("Unknown");
-        _detailTextField.stringValue = _NS("Unknown");
-        return;
-    }
-
-    _titleTextField.stringValue = actualItem.displayString;
-    _detailTextField.stringValue = actualItem.primaryDetailString;
-}
-
-- (void)setRepresentedItem:(VLCLibraryRepresentedItem *)representedItem
-{
-    if (representedItem == _representedItem) {
-        return;
-    }
-
-    _representedItem = representedItem;
-    [self updateRepresentation];
-}
-
-- (IBAction)play:(id)sender
-{
-    [self.representedItem play];
-}
-
-- (IBAction)enqueue:(id)sender
-{
-    [self.representedItem queue];
-}
-
-@end


=====================================
modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupTableHeaderView.h
=====================================
@@ -27,11 +27,14 @@
 NS_ASSUME_NONNULL_BEGIN
 
 extern const CGFloat VLCLibraryAudioGroupTableHeaderViewHeight;
+extern NSString * const VLCLibraryAudioGroupTableHeaderViewIdentifier;
 
 @interface VLCLibraryAudioGroupTableHeaderView : NSTableHeaderView
 
 @property (nullable, nonatomic) VLCLibraryRepresentedItem *representedItem;
+@property (readwrite, nonatomic) BOOL internalPaddingAddedForContentView;
 
+- (instancetype)initWithFrame:(NSRect)frameRect 
withInternalPaddingAddedForContentView:(BOOL)internalPaddingAddedForContentView;
 - (void)updateWithRepresentedItem:(nullable VLCLibraryRepresentedItem 
*)representedItem
                     fallbackTitle:(nullable NSString *)fallbackTitle
                    fallbackDetail:(nullable NSString *)fallbackDetail;


=====================================
modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupTableHeaderView.m
=====================================
@@ -28,8 +28,10 @@
 #import "extensions/NSColor+VLCAdditions.h"
 #import "extensions/NSFont+VLCAdditions.h"
 #import "extensions/NSString+Helpers.h"
+#import "extensions/NSView+VLCAdditions.h"
 
 const CGFloat VLCLibraryAudioGroupTableHeaderViewHeight = 86.f;
+NSString * const VLCLibraryAudioGroupTableHeaderViewIdentifier = 
@"VLCLibraryAudioGroupTableHeaderView";
 
 @interface VLCLibraryAudioGroupTableHeaderView ()
 
@@ -42,6 +44,9 @@ const CGFloat VLCLibraryAudioGroupTableHeaderViewHeight = 
86.f;
 @property NSButton *playButton;
 @property NSButton *queueButton;
 
+@property CGFloat backgroundTopInset;
+@property CGFloat backgroundBottomInset;
+
 @end
 
 @implementation VLCLibraryAudioGroupTableHeaderView
@@ -64,12 +69,21 @@ const CGFloat VLCLibraryAudioGroupTableHeaderViewHeight = 
86.f;
     return self;
 }
 
+- (instancetype)initWithFrame:(NSRect)frameRect 
withInternalPaddingAddedForContentView:(BOOL)internalPaddingAddedForContentView
+{
+    self = [super initWithFrame:frameRect];
+    if (self) {
+        _internalPaddingAddedForContentView = 
internalPaddingAddedForContentView;
+        [self commonInit];
+    }
+    return self;
+}
 
 - (void)commonInit
 {
     NSView *contentHostView = self;
-    const CGFloat backgroundTopInset = VLCLibraryUIUnits.largeSpacing + 
VLCLibraryUIUnits.mediumSpacing;
-    CGFloat backgroundBottomInset = 0.f;
+    self.backgroundTopInset = VLCLibraryUIUnits.largeSpacing + 
VLCLibraryUIUnits.mediumSpacing;
+    self.backgroundBottomInset = 0.f;
 
 #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 260000
     if (@available(macOS 26.0, *)) {
@@ -80,7 +94,7 @@ const CGFloat VLCLibraryAudioGroupTableHeaderViewHeight = 
86.f;
         glassView.contentView = glassContentView;
         self.backgroundView = glassView;
         contentHostView = glassContentView;
-        backgroundBottomInset = VLCLibraryUIUnits.largeSpacing + 
VLCLibraryUIUnits.mediumSpacing + VLCLibraryUIUnits.smallSpacing;
+        self.backgroundBottomInset = VLCLibraryUIUnits.largeSpacing + 
VLCLibraryUIUnits.mediumSpacing + VLCLibraryUIUnits.smallSpacing;
     } else
 #endif
     if (@available(macOS 10.14, *)) {
@@ -135,16 +149,16 @@ const CGFloat VLCLibraryAudioGroupTableHeaderViewHeight = 
86.f;
     const CGFloat horizontalContentInset = VLCLibraryUIUnits.mediumSpacing;
 
     [NSLayoutConstraint activateConstraints:@[
-        [self.backgroundView.topAnchor constraintEqualToAnchor:self.topAnchor 
constant:backgroundTopInset],
-        [self.backgroundView.leadingAnchor 
constraintEqualToAnchor:self.leadingAnchor],
-        [self.backgroundView.trailingAnchor 
constraintEqualToAnchor:self.trailingAnchor],
-        [self.backgroundView.bottomAnchor 
constraintEqualToAnchor:self.bottomAnchor constant:-backgroundBottomInset],
         [labelsStack.leadingAnchor 
constraintEqualToAnchor:contentHostView.leadingAnchor 
constant:horizontalContentInset],
         [labelsStack.centerYAnchor 
constraintEqualToAnchor:contentHostView.centerYAnchor],
         [contentHostView.trailingAnchor 
constraintEqualToAnchor:buttonsStack.trailingAnchor 
constant:horizontalContentInset],
         [buttonsStack.centerYAnchor 
constraintEqualToAnchor:contentHostView.centerYAnchor],
         [buttonsStack.leadingAnchor 
constraintGreaterThanOrEqualToAnchor:labelsStack.trailingAnchor 
constant:VLCLibraryUIUnits.largeSpacing],
     ]];
+    [self updateBackgroundConstraints];
+
+    self.layer = [CALayer new];
+    self.layer.backgroundColor = NSColor.clearColor.CGColor;
 
     if (@available(macOS 26.0, *)) {
     } else {
@@ -162,6 +176,27 @@ const CGFloat VLCLibraryAudioGroupTableHeaderViewHeight = 
86.f;
     }
 }
 
+- (void)updateBackgroundConstraints
+{
+    if (!self.internalPaddingAddedForContentView) {
+        [self.backgroundView applyConstraintsToFillSuperview];
+        return;
+    }
+    [NSLayoutConstraint activateConstraints:@[
+        [self.backgroundView.topAnchor constraintEqualToAnchor:self.topAnchor 
constant:self.backgroundTopInset],
+        [self.backgroundView.leadingAnchor 
constraintEqualToAnchor:self.leadingAnchor],
+        [self.backgroundView.trailingAnchor 
constraintEqualToAnchor:self.trailingAnchor],
+        [self.backgroundView.bottomAnchor 
constraintEqualToAnchor:self.bottomAnchor constant:-self.backgroundBottomInset],
+    ]];
+}
+
+- 
(void)setInternalPaddingAddedForContentView:(BOOL)internalPaddingAddedForContentView
+{
+    if (_internalPaddingAddedForContentView == 
internalPaddingAddedForContentView) return;
+    _internalPaddingAddedForContentView = internalPaddingAddedForContentView;
+    [self updateBackgroundConstraints];
+}
+
 - (void)observeValueForKeyPath:(NSString *)keyPath
                       ofObject:(id)object
                         change:(NSDictionary<NSKeyValueChangeKey,id> *)change


=====================================
modules/gui/macosx/library/audio-library/VLCLibraryAudioViewController.m
=====================================
@@ -41,7 +41,6 @@
 #import "library/audio-library/VLCLibraryAlbumTableCellView.h"
 #import "library/audio-library/VLCLibraryAudioDataSource.h"
 #import "library/audio-library/VLCLibraryAudioGroupDataSource.h"
-#import "library/audio-library/VLCLibraryAudioGroupHeaderView.h"
 #import "library/audio-library/VLCLibraryAudioGroupTableHeaderView.h"
 #import "library/audio-library/VLCLibraryAudioGroupTableViewDelegate.h"
 #import "library/audio-library/VLCLibraryAudioGroupTableHeaderCell.h"
@@ -197,7 +196,7 @@ NSString *VLCLibraryPlaceholderAudioViewIdentifier = 
@"VLCLibraryPlaceholderAudi
                                           0.f,
                                           
_audioGroupSelectionTableView.bounds.size.width,
                                           headerHeight);
-    _audioCollectionHeaderView = [[VLCLibraryAudioGroupTableHeaderView alloc] 
initWithFrame:headerFrame];
+    _audioCollectionHeaderView = [[VLCLibraryAudioGroupTableHeaderView alloc] 
initWithFrame:headerFrame withInternalPaddingAddedForContentView:YES];
     _audioCollectionHeaderView.autoresizingMask = NSViewWidthSizable;
 
     _audioGroupSelectionTableView.headerView = self.audioCollectionHeaderView;
@@ -233,7 +232,8 @@ NSString *VLCLibraryPlaceholderAudioViewIdentifier = 
@"VLCLibraryPlaceholderAudi
     VLCLibraryCollectionViewFlowLayout * const 
audioLibraryGridModeListSelectionCollectionViewLayout =
         VLCLibraryCollectionViewFlowLayout.standardLayout;
     
_audioLibraryGridModeSplitViewListSelectionCollectionView.collectionViewLayout 
= audioLibraryGridModeListSelectionCollectionViewLayout;
-    audioLibraryGridModeListSelectionCollectionViewLayout.headerReferenceSize 
= VLCLibraryAudioGroupHeaderView.defaultHeaderSize;
+    audioLibraryGridModeListSelectionCollectionViewLayout.headerReferenceSize =
+        
NSMakeSize(self.audioCollectionViewScrollView.documentView.frame.size.width, 
VLCLibraryAudioGroupTableHeaderViewHeight);
 
     if (@available(macOS 10.12, *)) {
         
audioLibraryGridModeListSelectionCollectionViewLayout.sectionHeadersPinToVisibleBounds
 = YES;



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/aca398cbec402a215c7c97f2851a91a3f8c744ee...c8a5818cfd8b1b277ec87d710cb39cb90560fea1

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/aca398cbec402a215c7c97f2851a91a3f8c744ee...c8a5818cfd8b1b277ec87d710cb39cb90560fea1
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to