[vlc-commits] [Git][videolan/vlc][master] 2 commits: macosx: Add detail string text view to VLCLibraryCollectionViewMediaItemSupplementaryView XIB

Steve Lhomme (@robUx4) gitlab at videolan.org
Mon Jan 2 08:07:03 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
694adda0 by Claudio Cambra at 2023-01-02T07:52:04+00:00
macosx: Add detail string text view to VLCLibraryCollectionViewMediaItemSupplementaryView XIB

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

- - - - -
81c7e3c8 by Claudio Cambra at 2023-01-02T07:52:04+00:00
macosx: Set media item supplementary view detail text view string

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

- - - - -


3 changed files:

- modules/gui/macosx/UI/VLCLibraryCollectionViewMediaItemSupplementaryDetailView.xib
- modules/gui/macosx/library/VLCLibraryCollectionViewMediaItemSupplementaryDetailView.h
- modules/gui/macosx/library/VLCLibraryCollectionViewMediaItemSupplementaryDetailView.m


Changes:

=====================================
modules/gui/macosx/UI/VLCLibraryCollectionViewMediaItemSupplementaryDetailView.xib
=====================================
@@ -8,28 +8,28 @@
         <customObject id="-2" userLabel="File's Owner" customClass="VLCLibraryCollectionViewMediaItemSupplementaryDetailView"/>
         <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
         <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <view misplaced="YES" id="HAc-or-XD8" customClass="VLCLibraryCollectionViewMediaItemSupplementaryDetailView">
-            <rect key="frame" x="0.0" y="0.0" width="1097" height="237"/>
+        <view id="HAc-or-XD8" customClass="VLCLibraryCollectionViewMediaItemSupplementaryDetailView">
+            <rect key="frame" x="0.0" y="0.0" width="1097" height="255"/>
             <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
             <subviews>
                 <stackView distribution="fill" orientation="horizontal" alignment="top" spacing="20" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="FWp-yd-2Pm">
-                    <rect key="frame" x="10" y="0.0" width="1077" height="207"/>
+                    <rect key="frame" x="10" y="0.0" width="1077" height="225"/>
                     <subviews>
                         <stackView distribution="equalCentering" orientation="vertical" alignment="leading" spacing="5" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="TOx-1e-6D9">
-                            <rect key="frame" x="0.0" y="10" width="162" height="197"/>
+                            <rect key="frame" x="0.0" y="10" width="180" height="215"/>
                             <subviews>
                                 <imageView horizontalCompressionResistancePriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="xZd-Hk-h2M" customClass="VLCImageView">
-                                    <rect key="frame" x="0.0" y="35" width="162" height="162"/>
+                                    <rect key="frame" x="0.0" y="35" width="180" height="180"/>
                                     <constraints>
                                         <constraint firstAttribute="width" secondItem="xZd-Hk-h2M" secondAttribute="height" multiplier="1:1" id="6yq-tW-e4k"/>
                                     </constraints>
                                     <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="axesIndependently" image="no-art" id="6X6-Og-u8A"/>
                                 </imageView>
                                 <stackView distribution="fillEqually" orientation="horizontal" alignment="top" spacing="5" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" verticalHuggingPriority="1000" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="6Nc-Mb-wDa">
-                                    <rect key="frame" x="0.0" y="0.0" width="162" height="30"/>
+                                    <rect key="frame" x="0.0" y="0.0" width="180" height="30"/>
                                     <subviews>
                                         <button verticalHuggingPriority="750" imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ntd-VT-2KS">
-                                            <rect key="frame" x="-6" y="-4" width="75" height="40"/>
+                                            <rect key="frame" x="-6" y="-4" width="93" height="40"/>
                                             <buttonCell key="cell" type="push" title=" Play" bezelStyle="rounded" image="play.fill" catalog="system" imagePosition="left" alignment="center" controlSize="large" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Rgc-Uk-A3h">
                                                 <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                                 <font key="font" metaFont="system"/>
@@ -39,7 +39,7 @@
                                             </connections>
                                         </button>
                                         <button verticalHuggingPriority="750" imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="idL-3a-QaA">
-                                            <rect key="frame" x="62" y="-4" width="106" height="40"/>
+                                            <rect key="frame" x="80" y="-4" width="106" height="40"/>
                                             <buttonCell key="cell" type="push" title=" Enqueue" bezelStyle="rounded" image="plus" catalog="system" imagePosition="left" alignment="center" controlSize="large" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="igY-iu-P0N">
                                                 <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                                 <font key="font" metaFont="system"/>
@@ -78,18 +78,26 @@
                             </customSpacing>
                         </stackView>
                         <stackView distribution="fill" orientation="vertical" alignment="leading" spacing="5" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" horizontalCompressionResistancePriority="250" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="bw7-QB-Ssc">
-                            <rect key="frame" x="182" y="0.0" width="895" height="207"/>
+                            <rect key="frame" x="200" y="0.0" width="877" height="225"/>
                             <subviews>
                                 <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="nCe-dY-YMM">
-                                    <rect key="frame" x="-2" y="181" width="167" height="26"/>
+                                    <rect key="frame" x="-2" y="199" width="167" height="26"/>
                                     <textFieldCell key="cell" lineBreakMode="truncatingTail" title="Media item 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"/>
                                     </textFieldCell>
                                 </textField>
+                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Slp-lt-fZv">
+                                    <rect key="frame" x="-2" y="178" width="146" height="16"/>
+                                    <textFieldCell key="cell" lineBreakMode="clipping" title="Media item detail string" id="S8T-h9-WYr">
+                                        <font key="font" metaFont="system"/>
+                                        <color key="textColor" red="1" green="0.38123786450000002" blue="0.039215686270000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                    </textFieldCell>
+                                </textField>
                                 <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="QuO-3G-BMT">
-                                    <rect key="frame" x="-2" y="160" width="94" height="16"/>
+                                    <rect key="frame" x="-2" y="157" width="94" height="16"/>
                                     <textFieldCell key="cell" lineBreakMode="clipping" title="Year · Duration" id="JBg-wo-ZeE">
                                         <font key="font" metaFont="system"/>
                                         <color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
@@ -97,10 +105,10 @@
                                     </textFieldCell>
                                 </textField>
                                 <stackView distribution="fill" orientation="horizontal" alignment="top" spacing="6" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="fiJ-9f-ecF">
-                                    <rect key="frame" x="0.0" y="136" width="107" height="19"/>
+                                    <rect key="frame" x="0.0" y="136" width="107" height="16"/>
                                     <subviews>
                                         <textField horizontalHuggingPriority="251" verticalHuggingPriority="1000" horizontalCompressionResistancePriority="1000" verticalCompressionResistancePriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="NZk-WW-Uay">
-                                            <rect key="frame" x="-2" y="3" width="72" height="16"/>
+                                            <rect key="frame" x="-2" y="0.0" width="72" height="16"/>
                                             <textFieldCell key="cell" lineBreakMode="clipping" title="File Name:" id="CyQ-Ao-mup">
                                                 <font key="font" metaFont="systemBold"/>
                                                 <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -108,7 +116,7 @@
                                             </textFieldCell>
                                         </textField>
                                         <textField verticalHuggingPriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="VxL-BW-3eh">
-                                            <rect key="frame" x="72" y="3" width="37" height="16"/>
+                                            <rect key="frame" x="72" y="0.0" width="37" height="16"/>
                                             <textFieldCell key="cell" title="Label" id="Pzf-s3-rHC">
                                                 <font key="font" usesAppearanceFont="YES"/>
                                                 <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -167,6 +175,7 @@
                                 <integer value="1000"/>
                                 <integer value="1000"/>
                                 <integer value="1000"/>
+                                <integer value="1000"/>
                             </visibilityPriorities>
                             <customSpacing>
                                 <real value="3.4028234663852886e+38"/>
@@ -174,6 +183,7 @@
                                 <real value="3.4028234663852886e+38"/>
                                 <real value="3.4028234663852886e+38"/>
                                 <real value="3.4028234663852886e+38"/>
+                                <real value="3.4028234663852886e+38"/>
                             </customSpacing>
                         </stackView>
                     </subviews>
@@ -203,6 +213,7 @@
             </constraints>
             <connections>
                 <outlet property="mediaItemArtworkImageView" destination="xZd-Hk-h2M" id="J8l-V9-P06"/>
+                <outlet property="mediaItemDetailTextField" destination="Slp-lt-fZv" id="d3t-41-l5t"/>
                 <outlet property="mediaItemFileNameTextField" destination="VxL-BW-3eh" id="fiL-3N-m3P"/>
                 <outlet property="mediaItemPathTextField" destination="7gY-3s-Kay" id="P4t-h1-m3P"/>
                 <outlet property="mediaItemTitleTextField" destination="nCe-dY-YMM" id="h3l-p0-w3e"/>


=====================================
modules/gui/macosx/library/VLCLibraryCollectionViewMediaItemSupplementaryDetailView.h
=====================================
@@ -35,6 +35,7 @@ extern NSCollectionViewSupplementaryElementKind const VLCLibraryCollectionViewMe
 
 @property (readwrite, retain, nonatomic) VLCMediaLibraryMediaItem *representedMediaItem;
 @property (readwrite, weak) IBOutlet NSTextField *mediaItemTitleTextField;
+ at property (readwrite, weak) IBOutlet NSTextField *mediaItemDetailTextField;
 @property (readwrite, weak) IBOutlet NSTextField *mediaItemYearAndDurationTextField;
 @property (readwrite, weak) IBOutlet NSTextField *mediaItemFileNameTextField;
 @property (readwrite, weak) IBOutlet NSTextField *mediaItemPathTextField;


=====================================
modules/gui/macosx/library/VLCLibraryCollectionViewMediaItemSupplementaryDetailView.m
=====================================
@@ -49,6 +49,8 @@ NSCollectionViewSupplementaryElementKind const VLCLibraryCollectionViewMediaItem
 - (void)awakeFromNib
 {
     _mediaItemTitleTextField.font = [NSFont VLCLibrarySupplementaryDetailViewTitleFont];
+    _mediaItemDetailTextField.font = [NSFont VLCLibrarySupplementaryDetailViewSubtitleFont];
+    _mediaItemDetailTextField.textColor = [NSColor VLCAccentColor];
 
     if(@available(macOS 10.12.2, *)) {
         _playMediaItemButton.bezelColor = [NSColor VLCAccentColor];
@@ -87,6 +89,7 @@ NSCollectionViewSupplementaryElementKind const VLCLibraryCollectionViewMediaItem
     }
 
     _mediaItemTitleTextField.stringValue = _representedMediaItem.displayString;
+    _mediaItemDetailTextField.stringValue = _representedMediaItem.detailString;
     _mediaItemYearAndDurationTextField.stringValue = [self formattedYearAndDurationString];
     _mediaItemFileNameTextField.stringValue = _representedMediaItem.inputItem.name;
     _mediaItemPathTextField.stringValue = _representedMediaItem.inputItem.decodedMRL;



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/3c802935d0dbe947715bd4e5f4be8a72279fddca...81c7e3c85d32e33ecba6892d6ae81726e44ffd93

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/3c802935d0dbe947715bd4e5f4be8a72279fddca...81c7e3c85d32e33ecba6892d6ae81726e44ffd93
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