[vlc-commits] [Git][videolan/vlc][master] 4 commits: macosx: Add outlet for background NSBox of audio group header view

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Wed Aug 2 21:33:05 UTC 2023



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
9ee21d85 by Claudio Cambra at 2023-08-02T21:04:01+00:00
macosx: Add outlet for background NSBox of audio group header view

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

- - - - -
be483616 by Claudio Cambra at 2023-08-02T21:04:01+00:00
macosx: Add subtle border colourset

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

- - - - -
edf812db by Claudio Cambra at 2023-08-02T21:04:01+00:00
macosx: Add subtle border colour with fallback to NSColor extensions

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

- - - - -
14aa26f3 by Claudio Cambra at 2023-08-02T21:04:01+00:00
macosx: Set audio group header view to use subtle border colour

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

- - - - -


6 changed files:

- + modules/gui/macosx/Resources/Assets.xcassets/VLCSubtleBorderColor.colorset/Contents.json
- modules/gui/macosx/UI/VLCLibraryAudioGroupHeaderView.xib
- modules/gui/macosx/extensions/NSColor+VLCAdditions.h
- modules/gui/macosx/extensions/NSColor+VLCAdditions.m
- modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupHeaderView.h
- modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupHeaderView.m


Changes:

=====================================
modules/gui/macosx/Resources/Assets.xcassets/VLCSubtleBorderColor.colorset/Contents.json
=====================================
@@ -0,0 +1,38 @@
+{
+  "colors" : [
+    {
+      "color" : {
+        "color-space" : "srgb",
+        "components" : {
+          "alpha" : "0.200",
+          "blue" : "0.000",
+          "green" : "0.000",
+          "red" : "0.000"
+        }
+      },
+      "idiom" : "universal"
+    },
+    {
+      "appearances" : [
+        {
+          "appearance" : "luminosity",
+          "value" : "dark"
+        }
+      ],
+      "color" : {
+        "color-space" : "srgb",
+        "components" : {
+          "alpha" : "0.200",
+          "blue" : "1.000",
+          "green" : "1.000",
+          "red" : "1.000"
+        }
+      },
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}


=====================================
modules/gui/macosx/UI/VLCLibraryAudioGroupHeaderView.xib
=====================================
@@ -122,6 +122,7 @@
                 <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="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/extensions/NSColor+VLCAdditions.h
=====================================
@@ -40,6 +40,7 @@ NS_ASSUME_NONNULL_BEGIN
 @property (class, readonly) NSColor *VLCSliderDarkBackgroundColor;
 @property (class, readonly) NSColor *VLCLightSubtleBorderColor;
 @property (class, readonly) NSColor *VLCDarkSubtleBorderColor;
+ at property (class, readonly) NSColor *VLCSubtleBorderColor;
 
 @end
 


=====================================
modules/gui/macosx/extensions/NSColor+VLCAdditions.m
=====================================
@@ -83,7 +83,6 @@
     return NSColor.VLCAccentColor;
 }
 
-
 + (NSColor *)VLCSliderLightBackgroundColor
 {
     return [NSColor colorWithCalibratedWhite:0.5 alpha:0.5];
@@ -104,4 +103,13 @@
     return [NSColor colorWithCalibratedWhite:1 alpha:0.2];
 }
 
++ (NSColor *)VLCSubtleBorderColor
+{
+    if (@available(macOS 10.13, *)) {
+        return [NSColor colorNamed:@"VLCSubtleBorderColor"];
+    }
+
+    return NSColor.VLCLightSubtleBorderColor;
+}
+
 @end


=====================================
modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupHeaderView.h
=====================================
@@ -38,6 +38,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;
 
 - (IBAction)play:(id)sender;
 - (IBAction)enqueue:(id)sender;


=====================================
modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupHeaderView.m
=====================================
@@ -41,6 +41,8 @@ NSString * const VLCLibraryAudioGroupHeaderViewIdentifier = @"VLCLibraryAudioGro
     if (@available(macOS 10.14, *)) {
         _playButton.bezelColor = NSColor.VLCAccentColor;
     }
+
+    _backgroundBox.borderColor = NSColor.VLCSubtleBorderColor;
 }
 
 - (void)updateRepresentation



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/cbc967ae6f8b831e4edd188aebdbe3b46c63d5e5...14aa26f3f9fefaff3f8877b7ca3d4290450e83b0

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