[vlc-commits] [Git][videolan/vlc][master] macosx: Improve detail view labels
Hugo Beauzée-Luyssen (@chouquette)
gitlab at videolan.org
Tue Aug 2 15:15:16 UTC 2022
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC
Commits:
5db447c8 by Claudio Cambra at 2022-08-02T14:12:07+00:00
macosx: Improve detail view labels
Signed-off-by: Claudio Cambra <claudio.cambra at gmail.com>
- - - - -
7 changed files:
- modules/gui/macosx/UI/VLCLibraryCollectionViewAlbumSupplementaryDetailView.xib
- modules/gui/macosx/extensions/NSColor+VLCAdditions.h
- modules/gui/macosx/extensions/NSColor+VLCAdditions.m
- modules/gui/macosx/extensions/NSFont+VLCAdditions.h
- modules/gui/macosx/extensions/NSFont+VLCAdditions.m
- modules/gui/macosx/library/VLCLibraryCollectionViewAlbumSupplementaryDetailView.h
- modules/gui/macosx/library/VLCLibraryCollectionViewAlbumSupplementaryDetailView.m
Changes:
=====================================
modules/gui/macosx/UI/VLCLibraryCollectionViewAlbumSupplementaryDetailView.xib
=====================================
@@ -44,8 +44,6 @@
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
- <color key="bezelColor" red="0.96497207880000002" green="0.38123786450000002" blue="0.048660390079999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
- <color key="contentTintColor" red="0.96497207880000002" green="0.38123786450000002" blue="0.048660390079999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<connections>
<action selector="playAction:" target="HAc-or-XD8" id="edJ-21-Ej1"/>
</connections>
@@ -96,7 +94,7 @@
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="nCe-dY-YMM">
<rect key="frame" x="-2" y="230" width="124" height="52"/>
- <textFieldCell key="cell" lineBreakMode="clipping" title="Album name" id="6RM-x8-Y4y">
+ <textFieldCell key="cell" lineBreakMode="truncatingTail" title="Album name" id="6RM-x8-Y4y">
<font key="font" textStyle="title1" name=".SFNS-Regular"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
@@ -104,7 +102,7 @@
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="751" translatesAutoresizingMaskIntoConstraints="NO" id="HnP-Fk-juB">
<rect key="frame" x="-2" y="206" width="87" height="16"/>
- <textFieldCell key="cell" lineBreakMode="clipping" title="Album details" id="Nwk-76-Wx9">
+ <textFieldCell key="cell" lineBreakMode="truncatingTail" title="Album details" id="Nwk-76-Wx9">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
@@ -203,6 +201,7 @@
<outlet property="albumDetailsTextField" destination="HnP-Fk-juB" id="Hm3-l8-a9s"/>
<outlet property="albumTitleTextField" destination="nCe-dY-YMM" id="h3l-p0-w3e"/>
<outlet property="albumTracksTableView" destination="eEJ-WA-0aM" id="l8k-M9-a8e"/>
+ <outlet property="playAlbumButton" destination="ntd-VT-2KS" id="ah5-as-eqw"/>
</connections>
<point key="canvasLocation" x="-237.5" y="-284"/>
</view>
=====================================
modules/gui/macosx/extensions/NSColor+VLCAdditions.h
=====================================
@@ -26,6 +26,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface NSColor (VLCAdditions)
++ (instancetype)VLCOrangeElementColor;
+ (instancetype)VLClibraryHighlightColor;
+ (instancetype)VLClibraryLightTitleColor;
+ (instancetype)VLClibraryDarkTitleColor;
=====================================
modules/gui/macosx/extensions/NSColor+VLCAdditions.m
=====================================
@@ -24,6 +24,11 @@
@implementation NSColor (VLCAdditions)
++ (instancetype)VLCOrangeElementColor
+{
+ return [NSColor colorWithRed:1. green:.38 blue:.04 alpha:1.];
+}
+
+ (instancetype)VLClibraryHighlightColor
{
return [NSColor colorWithRed:1. green:136./255. blue:.0 alpha:1.];
=====================================
modules/gui/macosx/extensions/NSFont+VLCAdditions.h
=====================================
@@ -40,6 +40,8 @@ NS_ASSUME_NONNULL_BEGIN
+ (instancetype)VLCplaylistSelectedItemLabelFont;
+ (instancetype)VLCsmallPlaylistLabelFont;
+ (instancetype)VLCsmallPlaylistSelectedItemLabelFont;
++ (instancetype)VLCLibrarySupplementaryDetailViewTitleFont;
++ (instancetype)VLCLibrarySupplementaryDetailViewSubtitleFont;
@end
=====================================
modules/gui/macosx/extensions/NSFont+VLCAdditions.m
=====================================
@@ -94,5 +94,14 @@
return [NSFont systemFontOfSize:10. weight:NSFontWeightBold];
}
++ (instancetype)VLCLibrarySupplementaryDetailViewTitleFont
+{
+ return [NSFont systemFontOfSize:20. weight:NSFontWeightSemibold];
+}
+
++ (instancetype)VLCLibrarySupplementaryDetailViewSubtitleFont
+{
+ return [NSFont systemFontOfSize:18. weight:NSFontWeightMedium];
+}
@end
=====================================
modules/gui/macosx/library/VLCLibraryCollectionViewAlbumSupplementaryDetailView.h
=====================================
@@ -36,6 +36,7 @@ extern NSCollectionViewSupplementaryElementKind const VLCLibraryCollectionViewAl
@property (readwrite, weak) IBOutlet NSTextField *albumDetailsTextField;
@property (readwrite, weak) IBOutlet VLCImageView *albumArtworkImageView;
@property (readwrite, weak) IBOutlet NSTableView *albumTracksTableView;
+ at property (readwrite, weak) IBOutlet NSButton *playAlbumButton;
- (IBAction)playAction:(id)sender;
- (IBAction)enqueueAction:(id)sender;
=====================================
modules/gui/macosx/library/VLCLibraryCollectionViewAlbumSupplementaryDetailView.m
=====================================
@@ -60,6 +60,13 @@ NSCollectionViewSupplementaryElementKind const VLCLibraryCollectionViewAlbumSupp
_tracksDataSource = [[VLCLibraryAlbumTracksDataSource alloc] init];
_albumTracksTableView.dataSource = _tracksDataSource;
_albumTracksTableView.delegate = _tracksDataSource;
+ _albumTitleTextField.font = [NSFont VLCLibrarySupplementaryDetailViewTitleFont];
+ _albumDetailsTextField.font = [ NSFont VLCLibrarySupplementaryDetailViewSubtitleFont];
+ _albumDetailsTextField.textColor = [NSColor VLCOrangeElementColor];
+
+ if(@available(macOS 10.12.2, *)) {
+ [_playAlbumButton setBezelColor:[NSColor VLCOrangeElementColor]];
+ }
}
- (void)setRepresentedAlbum:(VLCMediaLibraryAlbum *)representedAlbum
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/5db447c81664e32fe89fc2993298fde139bf17aa
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/5db447c81664e32fe89fc2993298fde139bf17aa
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