[vlc-commits] [Git][videolan/vlc][master] 3 commits: macosx: Give audio group header view a visual effect background

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Sun Mar 17 09:49:25 UTC 2024



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


Commits:
a13b6a7a by Claudio Cambra at 2024-03-17T09:09:04+00:00
macosx: Give audio group header view a visual effect background

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
be1ded48 by Claudio Cambra at 2024-03-17T09:09:04+00:00
macosx: Add corner radius to VLCLibraryAudioGroupHeaderView visual effect view

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
ea7ee72c by Claudio Cambra at 2024-03-17T09:09:04+00:00
macosx: Add border to audio group header view

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -


3 changed files:

- modules/gui/macosx/UI/VLCLibraryAudioGroupHeaderView.xib
- modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupHeaderView.h
- modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupHeaderView.m


Changes:

=====================================
modules/gui/macosx/UI/VLCLibraryAudioGroupHeaderView.xib
=====================================
@@ -1,34 +1,27 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<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="21701"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
         <capability name="Named colors" minToolsVersion="9.0"/>
-        <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>
     <objects>
         <customObject id="-2" userLabel="File's Owner"/>
         <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
         <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView translatesAutoresizingMaskIntoConstraints="NO" id="E6K-GD-bgu" customClass="VLCLibraryAudioGroupHeaderView">
+        <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>
-                <box boxType="custom" borderType="line" cornerRadius="5" title="Box" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="dxP-Cv-lN2">
+                <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"/>
-                    <view key="contentView" id="XfC-Xr-mxJ">
-                        <rect key="frame" x="1" y="1" width="728" height="84"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                    </view>
-                    <color key="borderColor" name="separatorColor" catalog="System" colorSpace="catalog"/>
-                    <color key="fillColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
-                </box>
+                </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 horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="VGp-RV-Jl4">
+                                <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="clipping" title="Audio Group" id="96R-yZ-Dap">
                                         <font key="font" metaFont="systemBold" size="24"/>
@@ -86,7 +79,7 @@
                                 <constraint firstItem="eE7-fJ-MtS" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="VGp-RV-Jl4" secondAttribute="trailing" constant="10" id="fsv-ju-hNO"/>
                             </constraints>
                         </customView>
-                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="8Fd-yT-2AG">
+                        <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"/>
@@ -112,17 +105,17 @@
                 </stackView>
             </subviews>
             <constraints>
-                <constraint firstAttribute="bottom" secondItem="dxP-Cv-lN2" secondAttribute="bottom" id="3Z8-gS-rVm"/>
-                <constraint firstItem="dxP-Cv-lN2" firstAttribute="leading" secondItem="E6K-GD-bgu" secondAttribute="leading" id="IVx-Qi-Hdt"/>
-                <constraint firstItem="dxP-Cv-lN2" firstAttribute="top" secondItem="E6K-GD-bgu" secondAttribute="top" id="Rbe-hF-1hS"/>
+                <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" constant="10" id="fw0-cv-Ofa"/>
-                <constraint firstAttribute="trailing" secondItem="dxP-Cv-lN2" secondAttribute="trailing" id="iTk-8w-5CF"/>
                 <constraint firstAttribute="trailing" secondItem="0Si-IF-hfH" secondAttribute="trailing" constant="10" 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" constant="10" id="sUV-bu-8ug"/>
                 <constraint firstItem="0Si-IF-hfH" firstAttribute="leading" secondItem="E6K-GD-bgu" secondAttribute="leading" constant="10" id="vM8-9F-b9Q"/>
             </constraints>
             <connections>
-                <outlet property="backgroundBox" destination="dxP-Cv-lN2" id="pwz-KB-noB"/>
+                <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"/>


=====================================
modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupHeaderView.h
=====================================
@@ -39,7 +39,7 @@ extern NSString * const VLCLibraryAudioGroupHeaderViewIdentifier;
 @property (readwrite, weak) IBOutlet NSTextField *detailTextField;
 @property (readwrite, weak) IBOutlet NSButton *playButton;
 @property (readwrite, weak) IBOutlet NSButton *queueButton;
- at property (readwrite, weak) IBOutlet NSBox *backgroundBox;
+ at property (readwrite, weak) IBOutlet NSVisualEffectView *backgroundEffectView;
 
 - (IBAction)play:(id)sender;
 - (IBAction)enqueue:(id)sender;


=====================================
modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupHeaderView.m
=====================================
@@ -30,6 +30,7 @@
 #import "library/VLCLibraryController.h"
 #import "library/VLCLibraryDataTypes.h"
 #import "library/VLCLibraryRepresentedItem.h"
+#import "library/VLCLibraryUIUnits.h"
 
 NSString * const VLCLibraryAudioGroupHeaderViewIdentifier = @"VLCLibraryAudioGroupHeaderViewIdentifier";
 
@@ -46,7 +47,10 @@ NSString * const VLCLibraryAudioGroupHeaderViewIdentifier = @"VLCLibraryAudioGro
         _playButton.bezelColor = NSColor.VLCAccentColor;
     }
 
-    _backgroundBox.borderColor = NSColor.VLCSubtleBorderColor;
+    self.backgroundEffectView.wantsLayer = YES;
+    self.backgroundEffectView.layer.cornerRadius = VLCLibraryUIUnits.smallSpacing;
+    self.backgroundEffectView.layer.borderWidth = 1;
+    self.backgroundEffectView.layer.borderColor = NSColor.VLCSubtleBorderColor.CGColor;
 }
 
 - (void)updateRepresentation



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/b61be68d6aebb657d207c51114eeb6f6592cac73...ea7ee72c7e8edbb49ef323608cbbd14c4970d980

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/b61be68d6aebb657d207c51114eeb6f6592cac73...ea7ee72c7e8edbb49ef323608cbbd14c4970d980
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