[vlc-commits] [Git][videolan/vlc][master] macosx: Unify use of orange accent color

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Sep 15 03:47:20 UTC 2022



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
afc3271e by Claudio Cambra at 2022-09-15T03:31:07+00:00
macosx: Unify use of orange accent color

Signed-off-by: Claudio Cambra <claudio.cambra at gmail.com>

- - - - -


7 changed files:

- modules/gui/macosx/extensions/NSColor+VLCAdditions.h
- modules/gui/macosx/extensions/NSColor+VLCAdditions.m
- modules/gui/macosx/library/VLCLibraryAlbumTableCellView.m
- modules/gui/macosx/library/VLCLibraryCollectionViewAlbumSupplementaryDetailView.m
- modules/gui/macosx/library/VLCLibraryCollectionViewItem.m
- modules/gui/macosx/library/VLCLibrarySongTableCellView.m
- modules/gui/macosx/views/VLCCustomWindowButton.m


Changes:

=====================================
modules/gui/macosx/extensions/NSColor+VLCAdditions.h
=====================================
@@ -26,8 +26,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface NSColor (VLCAdditions)
 
++ (instancetype)VLCAccentColor;
 + (instancetype)VLCOrangeElementColor;
-+ (instancetype)VLClibraryHighlightColor;
 + (instancetype)VLClibraryLightTitleColor;
 + (instancetype)VLClibraryDarkTitleColor;
 + (instancetype)VLClibrarySubtitleColor;


=====================================
modules/gui/macosx/extensions/NSColor+VLCAdditions.m
=====================================
@@ -24,14 +24,14 @@
 
 @implementation NSColor (VLCAdditions)
 
-+ (instancetype)VLCOrangeElementColor
++ (instancetype)VLCAccentColor
 {
-    return [NSColor colorWithRed:1. green:.38 blue:.04 alpha:1.];
+     return [NSColor VLCOrangeElementColor];
 }
 
-+ (instancetype)VLClibraryHighlightColor
++ (instancetype)VLCOrangeElementColor
 {
-    return [NSColor colorWithRed:1. green:136./255. blue:.0 alpha:1.];
+    return [NSColor colorWithRed:1. green:.38 blue:.04 alpha:1.];
 }
 
 + (instancetype)VLClibraryLightTitleColor


=====================================
modules/gui/macosx/library/VLCLibraryAlbumTableCellView.m
=====================================
@@ -109,10 +109,11 @@ const CGFloat VLCLibraryAlbumTableCellViewSmallSpacing = 5;
     [self setupTracksTableView];
     self.albumNameTextField.font = [NSFont VLClibraryLargeCellTitleFont];
     self.artistNameTextField.font = [NSFont VLClibraryLargeCellSubtitleFont];
-    self.artistNameTextField.textColor = [NSColor VLCOrangeElementColor];
     self.yearTextField.font = [NSFont VLClibrarySmallCellTitleFont];
     self.summaryTextField.font = [NSFont VLClibrarySmallCellTitleFont];
     self.trackingView.viewToHide = self.playInstantlyButton;
+    self.artistNameTextField.textColor = [NSColor VLCAccentColor];
+
     [self prepareForReuse];
 }
 


=====================================
modules/gui/macosx/library/VLCLibraryCollectionViewAlbumSupplementaryDetailView.m
=====================================
@@ -64,10 +64,11 @@ NSCollectionViewSupplementaryElementKind const VLCLibraryCollectionViewAlbumSupp
     
     _albumTitleTextField.font = [NSFont VLCLibrarySupplementaryDetailViewTitleFont];
     _albumDetailsTextField.font = [NSFont VLCLibrarySupplementaryDetailViewSubtitleFont];
-    _albumDetailsTextField.textColor = [NSColor VLCOrangeElementColor];
+
+    _albumDetailsTextField.textColor = [NSColor VLCAccentColor];
 
     if(@available(macOS 10.12.2, *)) {
-        [_playAlbumButton setBezelColor:[NSColor VLCOrangeElementColor]];
+        _playAlbumButton.bezelColor = [NSColor VLCAccentColor];
     }
 }
 


=====================================
modules/gui/macosx/library/VLCLibraryCollectionViewItem.m
=====================================
@@ -82,8 +82,8 @@ const CGFloat VLCLibraryCollectionViewItemMaximumDisplayedProgress = 0.95;
     self.annotationTextField.backgroundColor = [NSColor VLClibraryAnnotationBackgroundColor];
     self.unplayedIndicatorTextField.stringValue = _NS("NEW");
     self.unplayedIndicatorTextField.font = [NSFont VLClibraryHighlightCellHighlightLabelFont];
-    self.unplayedIndicatorTextField.textColor = [NSColor VLClibraryHighlightColor];
-    self.highlightBox.borderColor = [NSColor VLCOrangeElementColor];
+    self.highlightBox.borderColor = [NSColor VLCAccentColor];
+    self.unplayedIndicatorTextField.textColor = [NSColor VLCAccentColor];
 
     if (@available(macOS 10.14, *)) {
         [[NSApplication sharedApplication] addObserver:self


=====================================
modules/gui/macosx/library/VLCLibrarySongTableCellView.m
=====================================
@@ -21,6 +21,7 @@
  *****************************************************************************/
 
 #import "VLCLibrarySongTableCellView.h"
+#import "extensions/NSColor+VLCAdditions.h"
 #import "extensions/NSFont+VLCAdditions.h"
 #import "extensions/NSString+Helpers.h"
 #import "views/VLCImageView.h"
@@ -43,6 +44,10 @@ NSString *VLCAudioLibrarySongCellIdentifier = @"VLCAudioLibrarySongCellIdentifie
 
 - (void)awakeFromNib
 {
+    if(@available(macOS 10.14, *)) {
+        self.playInstantlyButton.contentTintColor = [NSColor VLCAccentColor];
+    }
+
     self.playInstantlyButton.target = self;
     self.playInstantlyButton.action = @selector(playInstantly:);
 


=====================================
modules/gui/macosx/views/VLCCustomWindowButton.m
=====================================
@@ -268,7 +268,7 @@
 -(void)awakeFromNib
 {
     self.wantsLayer = YES;
-    self.layer.backgroundColor = [NSColor VLClibraryHighlightColor].CGColor;
+    self.layer.backgroundColor = [NSColor VLCAccentColor].CGColor;
     self.layer.cornerRadius = 6.0f;
     
     self.bezelStyle = NSBezelStyleRecessed;



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/afc3271eb8db684baf7fa97f8ed734939c02b1db

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