vlc | branch: master | Felix Paul Kühne <fe...@feepk.net> | Wed Aug 14 11:21:14 2019 +0200| [87ea1fff3380e543326292b75040f6ec05e41d1b] | committer: Felix Paul Kühne
macosx: simplify audio library view management > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=87ea1fff3380e543326292b75040f6ec05e41d1b --- modules/gui/macosx/UI/VLCLibraryWindow.xib | 355 +++++++++++++------------- modules/gui/macosx/library/VLCLibraryWindow.h | 7 +- modules/gui/macosx/library/VLCLibraryWindow.m | 87 +++---- 3 files changed, 214 insertions(+), 235 deletions(-) diff --git a/modules/gui/macosx/UI/VLCLibraryWindow.xib b/modules/gui/macosx/UI/VLCLibraryWindow.xib index 46938befb5..81ccac84fe 100644 --- a/modules/gui/macosx/UI/VLCLibraryWindow.xib +++ b/modules/gui/macosx/UI/VLCLibraryWindow.xib @@ -510,9 +510,12 @@ </constraints> </view> <connections> - <outlet property="audioCollectionSelectionTableView" destination="LNt-ot-2wU" id="eJS-WZ-Ri7"/> - <outlet property="audioGroupSelectionTableView" destination="4ll-T2-J16" id="bjS-a8-ePC"/> - <outlet property="audioLibrarySplitView" destination="llh-BF-BEJ" id="Uri-tX-OQS"/> + <outlet property="audioCollectionSelectionTableView" destination="LNt-ot-2wU" id="aim-ER-CpD"/> + <outlet property="audioCollectionViewScrollView" destination="AYf-gS-P66" id="Jmt-vH-Vgq"/> + <outlet property="audioGroupSelectionTableView" destination="4ll-T2-J16" id="m18-cT-5BQ"/> + <outlet property="audioLibraryCollectionView" destination="QAt-jP-zE7" id="Lda-FY-5gD"/> + <outlet property="audioLibrarySplitView" destination="llh-BF-BEJ" id="gvt-K1-cGw"/> + <outlet property="audioLibraryView" destination="lpg-UW-pTq" id="FYD-PV-Ce2"/> <outlet property="audioSegmentedControl" destination="8iI-b7-Eag" id="ERG-nc-ziq"/> <outlet property="clearPlaylistButton" destination="cih-xp-HmY" id="PoU-co-0kn"/> <outlet property="clearPlaylistSeparator" destination="nAW-KH-ipk" id="Af9-fg-u7m"/> @@ -536,8 +539,6 @@ <outlet property="repeatPlaylistButton" destination="8zF-Wo-H79" id="6bH-HF-arx"/> <outlet property="segmentedTitleControl" destination="W1M-0o-qYG" id="Gw1-T6-78k"/> <outlet property="shufflePlaylistButton" destination="jg5-33-vH0" id="FV2-36-3lG"/> - <outlet property="tiledAudioCollectionView" destination="QAt-jP-zE7" id="xub-8L-KQV"/> - <outlet property="tiledAudioView" destination="k7f-ic-LrF" id="GIA-T1-rxU"/> <outlet property="upNextLabel" destination="TET-5r-zHx" id="3oI-LK-NDP"/> <outlet property="upNextSeparator" destination="qmL-Ar-cj1" id="GRX-ZE-2UG"/> <outlet property="videoLibraryCollectionView" destination="B8x-e8-7zp" id="u1I-gn-IU1"/> @@ -642,175 +643,6 @@ </customSpacing> <point key="canvasLocation" x="585" y="10"/> </stackView> - <splitView dividerStyle="thin" vertical="YES" id="llh-BF-BEJ"> - <rect key="frame" x="0.0" y="0.0" width="508" height="327"/> - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> - <subviews> - <scrollView fixedFrame="YES" borderType="none" autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" id="HrP-Dz-Uh0"> - <rect key="frame" x="0.0" y="0.0" width="222" height="327"/> - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> - <clipView key="contentView" id="qva-RZ-DvL"> - <rect key="frame" x="0.0" y="0.0" width="222" height="327"/> - <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> - <subviews> - <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnReordering="NO" columnSelection="YES" multipleSelection="NO" autosaveColumns="NO" viewBased="YES" id="LNt-ot-2wU"> - <rect key="frame" x="0.0" y="0.0" width="222" height="327"/> - <autoresizingMask key="autoresizingMask"/> - <size key="intercellSpacing" width="3" height="2"/> - <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/> - <color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/> - <tableColumns> - <tableColumn width="219" minWidth="40" maxWidth="1000" id="z5o-3O-6vc"> - <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border"> - <font key="font" metaFont="smallSystem"/> - <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/> - <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/> - </tableHeaderCell> - <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" title="Text Cell" id="eXM-oB-xvr"> - <font key="font" metaFont="system"/> - <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> - <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/> - </textFieldCell> - <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/> - <prototypeCellViews> - <tableCellView id="EIR-sY-f8g"> - <rect key="frame" x="1" y="1" width="219" height="17"/> - <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> - <subviews> - <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="xaz-WB-iQI"> - <rect key="frame" x="0.0" y="0.0" width="219" height="17"/> - <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/> - <textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Table View Cell" id="zRF-hR-42C"> - <font key="font" metaFont="system"/> - <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> - <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> - </textFieldCell> - </textField> - </subviews> - <connections> - <outlet property="textField" destination="xaz-WB-iQI" id="922-hW-hWo"/> - </connections> - </tableCellView> - </prototypeCellViews> - </tableColumn> - </tableColumns> - </tableView> - </subviews> - </clipView> - <scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="aaq-MO-i51"> - <rect key="frame" x="0.0" y="311" width="154" height="16"/> - <autoresizingMask key="autoresizingMask"/> - </scroller> - <scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="4hx-EC-ewp"> - <rect key="frame" x="224" y="17" width="15" height="102"/> - <autoresizingMask key="autoresizingMask"/> - </scroller> - </scrollView> - <scrollView fixedFrame="YES" borderType="none" autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" id="Jmx-bp-HDp"> - <rect key="frame" x="223" y="0.0" width="285" height="327"/> - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> - <clipView key="contentView" id="xCC-h9-931"> - <rect key="frame" x="0.0" y="0.0" width="285" height="327"/> - <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> - <subviews> - <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnReordering="NO" multipleSelection="NO" autosaveColumns="NO" rowSizeStyle="automatic" viewBased="YES" id="4ll-T2-J16"> - <rect key="frame" x="0.0" y="0.0" width="285" height="327"/> - <autoresizingMask key="autoresizingMask"/> - <size key="intercellSpacing" width="3" height="2"/> - <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/> - <color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/> - <tableColumns> - <tableColumn width="282" minWidth="40" maxWidth="1000" id="WLd-Pi-bR4"> - <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border"> - <font key="font" metaFont="smallSystem"/> - <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/> - <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/> - </tableHeaderCell> - <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" title="Text Cell" id="Ecs-pW-kyf"> - <font key="font" metaFont="system"/> - <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> - <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/> - </textFieldCell> - <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/> - <prototypeCellViews> - <tableCellView id="iSk-Qz-DTG"> - <rect key="frame" x="1" y="1" width="282" height="17"/> - <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> - <subviews> - <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="6ht-Tg-XJ9"> - <rect key="frame" x="0.0" y="0.0" width="282" height="17"/> - <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/> - <textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Table View Cell" id="dbf-tg-Ss3"> - <font key="font" metaFont="system"/> - <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> - <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> - </textFieldCell> - </textField> - </subviews> - <connections> - <outlet property="textField" destination="6ht-Tg-XJ9" id="GT2-9W-mo0"/> - </connections> - </tableCellView> - </prototypeCellViews> - </tableColumn> - </tableColumns> - </tableView> - </subviews> - </clipView> - <scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="mRg-Fu-cbF"> - <rect key="frame" x="1" y="310" width="195" height="16"/> - <autoresizingMask key="autoresizingMask"/> - </scroller> - <scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="dLx-ZX-Ou3"> - <rect key="frame" x="224" y="17" width="15" height="102"/> - <autoresizingMask key="autoresizingMask"/> - </scroller> - </scrollView> - </subviews> - <holdingPriorities> - <real value="250"/> - <real value="250"/> - </holdingPriorities> - <point key="canvasLocation" x="109" y="-224.5"/> - </splitView> - <customView id="k7f-ic-LrF"> - <rect key="frame" x="0.0" y="0.0" width="500" height="302"/> - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> - <subviews> - <scrollView wantsLayer="YES" borderType="none" autohidesScrollers="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AYf-gS-P66"> - <rect key="frame" x="0.0" y="0.0" width="500" height="302"/> - <clipView key="contentView" id="2oa-WL-dxA"> - <rect key="frame" x="0.0" y="0.0" width="500" height="302"/> - <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> - <subviews> - <collectionView id="QAt-jP-zE7"> - <rect key="frame" x="0.0" y="0.0" width="500" height="302"/> - <autoresizingMask key="autoresizingMask" widthSizable="YES"/> - <collectionViewFlowLayout key="collectionViewLayout" minimumInteritemSpacing="10" minimumLineSpacing="10" id="oKT-Ic-UdV"> - <size key="itemSize" width="50" height="50"/> - </collectionViewFlowLayout> - <color key="primaryBackgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/> - </collectionView> - </subviews> - </clipView> - <scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="Wb8-r8-xfF"> - <rect key="frame" x="-100" y="-100" width="233" height="15"/> - <autoresizingMask key="autoresizingMask"/> - </scroller> - <scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="Lae-xQ-39f"> - <rect key="frame" x="484" y="0.0" width="16" height="271"/> - <autoresizingMask key="autoresizingMask"/> - </scroller> - </scrollView> - </subviews> - <constraints> - <constraint firstAttribute="trailing" secondItem="AYf-gS-P66" secondAttribute="trailing" id="KEG-os-Mk9"/> - <constraint firstAttribute="bottom" secondItem="AYf-gS-P66" secondAttribute="bottom" id="Wkc-LW-FiO"/> - <constraint firstItem="AYf-gS-P66" firstAttribute="leading" secondItem="k7f-ic-LrF" secondAttribute="leading" id="tqb-gA-coA"/> - <constraint firstItem="AYf-gS-P66" firstAttribute="top" secondItem="k7f-ic-LrF" secondAttribute="top" id="wMO-EV-Yya"/> - </constraints> - <point key="canvasLocation" x="247" y="771"/> - </customView> <customView id="eHd-Q9-F8D"> <rect key="frame" x="0.0" y="0.0" width="528" height="307"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> @@ -819,7 +651,7 @@ <rect key="frame" x="0.0" y="0.0" width="528" height="267"/> <clipView key="contentView" id="5co-vI-cEn"> <rect key="frame" x="0.0" y="0.0" width="528" height="267"/> - <autoresizingMask key="autoresizingMask"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnReordering="NO" columnSelection="YES" multipleSelection="NO" autosaveColumns="NO" viewBased="YES" id="vpJ-Oz-Ebz"> <rect key="frame" x="0.0" y="0.0" width="528" height="267"/> @@ -878,7 +710,7 @@ <rect key="frame" x="0.0" y="0.0" width="528" height="267"/> <clipView key="contentView" id="tI4-x3-55j"> <rect key="frame" x="0.0" y="0.0" width="528" height="267"/> - <autoresizingMask key="autoresizingMask"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <collectionView selectable="YES" id="r7v-GI-W1U"> <rect key="frame" x="0.0" y="0.0" width="528" height="267"/> @@ -934,6 +766,177 @@ </constraints> <point key="canvasLocation" x="144" y="161.5"/> </customView> + <customView id="lpg-UW-pTq"> + <rect key="frame" x="0.0" y="0.0" width="714" height="390"/> + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> + <subviews> + <splitView dividerStyle="thin" vertical="YES" translatesAutoresizingMaskIntoConstraints="NO" id="llh-BF-BEJ"> + <rect key="frame" x="0.0" y="0.0" width="714" height="390"/> + <subviews> + <scrollView fixedFrame="YES" borderType="none" autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" id="HrP-Dz-Uh0"> + <rect key="frame" x="0.0" y="0.0" width="312" height="390"/> + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> + <clipView key="contentView" id="qva-RZ-DvL"> + <rect key="frame" x="0.0" y="0.0" width="312" height="390"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <subviews> + <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnReordering="NO" columnSelection="YES" multipleSelection="NO" autosaveColumns="NO" viewBased="YES" id="LNt-ot-2wU"> + <rect key="frame" x="0.0" y="0.0" width="312" height="390"/> + <autoresizingMask key="autoresizingMask"/> + <size key="intercellSpacing" width="3" height="2"/> + <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/> + <color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/> + <tableColumns> + <tableColumn width="309" minWidth="40" maxWidth="1000" id="z5o-3O-6vc"> + <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border"> + <font key="font" metaFont="smallSystem"/> + <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/> + <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/> + </tableHeaderCell> + <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" title="Text Cell" id="eXM-oB-xvr"> + <font key="font" metaFont="system"/> + <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> + <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/> + </textFieldCell> + <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/> + <prototypeCellViews> + <tableCellView id="EIR-sY-f8g"> + <rect key="frame" x="1" y="1" width="309" height="17"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <subviews> + <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="xaz-WB-iQI"> + <rect key="frame" x="0.0" y="0.0" width="309" height="17"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/> + <textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Table View Cell" id="zRF-hR-42C"> + <font key="font" metaFont="system"/> + <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> + <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> + </textFieldCell> + </textField> + </subviews> + <connections> + <outlet property="textField" destination="xaz-WB-iQI" id="922-hW-hWo"/> + </connections> + </tableCellView> + </prototypeCellViews> + </tableColumn> + </tableColumns> + </tableView> + </subviews> + </clipView> + <scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="aaq-MO-i51"> + <rect key="frame" x="0.0" y="311" width="312" height="16"/> + <autoresizingMask key="autoresizingMask"/> + </scroller> + <scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="4hx-EC-ewp"> + <rect key="frame" x="224" y="17" width="15" height="102"/> + <autoresizingMask key="autoresizingMask"/> + </scroller> + </scrollView> + <scrollView fixedFrame="YES" borderType="none" autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" id="Jmx-bp-HDp"> + <rect key="frame" x="313" y="0.0" width="401" height="390"/> + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> + <clipView key="contentView" id="xCC-h9-931"> + <rect key="frame" x="0.0" y="0.0" width="401" height="390"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <subviews> + <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnReordering="NO" multipleSelection="NO" autosaveColumns="NO" rowSizeStyle="automatic" viewBased="YES" id="4ll-T2-J16"> + <rect key="frame" x="0.0" y="0.0" width="401" height="390"/> + <autoresizingMask key="autoresizingMask"/> + <size key="intercellSpacing" width="3" height="2"/> + <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/> + <color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/> + <tableColumns> + <tableColumn width="398" minWidth="40" maxWidth="1000" id="WLd-Pi-bR4"> + <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border"> + <font key="font" metaFont="smallSystem"/> + <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/> + <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/> + </tableHeaderCell> + <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" title="Text Cell" id="Ecs-pW-kyf"> + <font key="font" metaFont="system"/> + <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> + <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/> + </textFieldCell> + <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/> + <prototypeCellViews> + <tableCellView id="iSk-Qz-DTG"> + <rect key="frame" x="1" y="1" width="398" height="17"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <subviews> + <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="6ht-Tg-XJ9"> + <rect key="frame" x="0.0" y="0.0" width="398" height="17"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/> + <textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Table View Cell" id="dbf-tg-Ss3"> + <font key="font" metaFont="system"/> + <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> + <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> + </textFieldCell> + </textField> + </subviews> + <connections> + <outlet property="textField" destination="6ht-Tg-XJ9" id="GT2-9W-mo0"/> + </connections> + </tableCellView> + </prototypeCellViews> + </tableColumn> + </tableColumns> + </tableView> + </subviews> + </clipView> + <scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="mRg-Fu-cbF"> + <rect key="frame" x="0.0" y="311" width="401" height="16"/> + <autoresizingMask key="autoresizingMask"/> + </scroller> + <scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="dLx-ZX-Ou3"> + <rect key="frame" x="224" y="17" width="15" height="102"/> + <autoresizingMask key="autoresizingMask"/> + </scroller> + </scrollView> + </subviews> + <holdingPriorities> + <real value="250"/> + <real value="250"/> + </holdingPriorities> + </splitView> + <scrollView wantsLayer="YES" borderType="none" autohidesScrollers="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AYf-gS-P66"> + <rect key="frame" x="0.0" y="0.0" width="714" height="390"/> + <clipView key="contentView" id="2oa-WL-dxA"> + <rect key="frame" x="0.0" y="0.0" width="714" height="390"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <subviews> + <collectionView id="QAt-jP-zE7"> + <rect key="frame" x="0.0" y="0.0" width="714" height="390"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES"/> + <collectionViewFlowLayout key="collectionViewLayout" minimumInteritemSpacing="10" minimumLineSpacing="10" id="oKT-Ic-UdV"> + <size key="itemSize" width="50" height="50"/> + </collectionViewFlowLayout> + <color key="primaryBackgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/> + </collectionView> + </subviews> + </clipView> + <scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="Wb8-r8-xfF"> + <rect key="frame" x="-100" y="-100" width="233" height="15"/> + <autoresizingMask key="autoresizingMask"/> + </scroller> + <scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="Lae-xQ-39f"> + <rect key="frame" x="484" y="0.0" width="16" height="271"/> + <autoresizingMask key="autoresizingMask"/> + </scroller> + </scrollView> + </subviews> + <constraints> + <constraint firstItem="llh-BF-BEJ" firstAttribute="top" secondItem="lpg-UW-pTq" secondAttribute="top" id="1dm-EQ-5C7"/> + <constraint firstItem="AYf-gS-P66" firstAttribute="leading" secondItem="lpg-UW-pTq" secondAttribute="leading" id="4Bs-W4-a8H"/> + <constraint firstItem="AYf-gS-P66" firstAttribute="top" secondItem="lpg-UW-pTq" secondAttribute="top" id="CLf-sg-pyk"/> + <constraint firstAttribute="trailing" secondItem="llh-BF-BEJ" secondAttribute="trailing" id="Fqs-1A-XdD"/> + <constraint firstItem="llh-BF-BEJ" firstAttribute="leading" secondItem="lpg-UW-pTq" secondAttribute="leading" id="R2e-oG-oCH"/> + <constraint firstAttribute="bottom" secondItem="AYf-gS-P66" secondAttribute="bottom" id="aTn-9G-2TE"/> + <constraint firstAttribute="bottom" secondItem="llh-BF-BEJ" secondAttribute="bottom" id="buL-6V-txw"/> + <constraint firstAttribute="trailing" secondItem="AYf-gS-P66" secondAttribute="trailing" id="riC-72-Ldb"/> + </constraints> + <point key="canvasLocation" x="237" y="661"/> + </customView> </objects> <resources> <image name="NSHomeTemplate" width="14" height="14"/> diff --git a/modules/gui/macosx/library/VLCLibraryWindow.h b/modules/gui/macosx/library/VLCLibraryWindow.h index dbc709cb6a..8af94532b2 100644 --- a/modules/gui/macosx/library/VLCLibraryWindow.h +++ b/modules/gui/macosx/library/VLCLibraryWindow.h @@ -43,9 +43,13 @@ NS_ASSUME_NONNULL_BEGIN @property (readwrite, weak) IBOutlet NSCollectionView *videoLibraryCollectionView; @property (readwrite, weak) IBOutlet NSCollectionView *recentVideoLibraryCollectionView; @property (readwrite, weak) IBOutlet NSCollectionView *mediaSourceCollectionView; +@property (readwrite, weak) IBOutlet NSView *audioLibraryView; @property (readwrite, weak) IBOutlet NSSplitView *audioLibrarySplitView; @property (readwrite, weak) IBOutlet NSTableView *audioCollectionSelectionTableView; @property (readwrite, weak) IBOutlet NSTableView *audioGroupSelectionTableView; +@property (readwrite, weak) IBOutlet NSScrollView *audioCollectionViewScrollView; +@property (readwrite, weak) IBOutlet NSCollectionView *audioLibraryCollectionView; +@property (readwrite, weak) IBOutlet NSSegmentedControl *audioSegmentedControl; @property (readwrite, weak) IBOutlet NSView *mediaSourceView; @property (readwrite, weak) IBOutlet NSButton *mediaSourceHomeButton; @property (readwrite, weak) IBOutlet NSPathControl *mediaSourcePathControl; @@ -62,9 +66,6 @@ NS_ASSUME_NONNULL_BEGIN @property (readwrite, weak) IBOutlet NSButton *repeatPlaylistButton; @property (readwrite, weak) IBOutlet NSButton *shufflePlaylistButton; @property (readwrite, weak) IBOutlet VLCRoundedCornerTextField *playlistCounterTextField; -@property (readwrite, weak) IBOutlet NSView *tiledAudioView; -@property (readwrite, weak) IBOutlet NSCollectionView *tiledAudioCollectionView; -@property (readwrite, weak) IBOutlet NSSegmentedControl *audioSegmentedControl; @property (readwrite, weak) IBOutlet NSButton *librarySortButton; @property (readonly) BOOL nativeFullscreenMode; diff --git a/modules/gui/macosx/library/VLCLibraryWindow.m b/modules/gui/macosx/library/VLCLibraryWindow.m index 92c8e2ae02..060695b768 100644 --- a/modules/gui/macosx/library/VLCLibraryWindow.m +++ b/modules/gui/macosx/library/VLCLibraryWindow.m @@ -72,7 +72,7 @@ const CGFloat VLCLibraryWindowDefaultPlaylistWidth = 340.; VLCLibraryGroupDataSource *_libraryAudioGroupDataSource; VLCLibrarySortingMenuController *_librarySortingMenuController; VLCMediaSourceBaseDataSource *_mediaSourceDataSource; - VLCLibraryTiledAudioViewController *_tiledAudioViewController; + VLCLibraryTiledAudioViewController *_gridAudioViewController; VLCPlaylistSortingMenuController *_playlistSortingMenuController; VLCPlaylistController *_playlistController; @@ -248,11 +248,11 @@ static int ShowController(vlc_object_t *p_this, const char *psz_variable, [self updateColorsBasedOnAppearance]; self.openMediaButton.title = _NS("Open media..."); - _tiledAudioViewController = [[VLCLibraryTiledAudioViewController alloc] init]; - _tiledAudioViewController.collectionView = self.tiledAudioCollectionView; - _tiledAudioViewController.segmentedControl = self.audioSegmentedControl; - _tiledAudioViewController.libraryModel = mainInstance.libraryController.libraryModel; - [_tiledAudioViewController setupAppearance]; + _gridAudioViewController = [[VLCLibraryTiledAudioViewController alloc] init]; + _gridAudioViewController.collectionView = self.audioLibraryCollectionView; + _gridAudioViewController.segmentedControl = self.audioSegmentedControl; + _gridAudioViewController.libraryModel = mainInstance.libraryController.libraryModel; + [_gridAudioViewController setupAppearance]; _mainSplitView.delegate = self; _lastPlaylistWidthBeforeCollaps = VLCLibraryWindowDefaultPlaylistWidth; @@ -366,13 +366,7 @@ static int ShowController(vlc_object_t *p_this, const char *psz_variable, break; case 1: - if (self.gridVsListSegmentedControl.selectedSegment == 0) { - [self showGridAudioLibrary]; - } else { - [self showListAudioLibrary]; - } - self.gridVsListSegmentedControl.target = self; - self.gridVsListSegmentedControl.action = @selector(segmentedControlAction:); + [self showAudioLibrary]; break; default: @@ -386,11 +380,8 @@ static int ShowController(vlc_object_t *p_this, const char *psz_variable, if (_mediaSourceView.superview != nil) { [_mediaSourceView removeFromSuperview]; } - if (_audioLibrarySplitView.superview != nil) { - [_audioLibrarySplitView removeFromSuperview]; - } - if (_tiledAudioView.superview != nil) { - [_tiledAudioView removeFromSuperview]; + if (_audioLibraryView.superview != nil) { + [_audioLibraryView removeFromSuperview]; } if (_videoLibraryStackView.superview == nil) { _videoLibraryStackView.translatesAutoresizingMaskIntoConstraints = NO; @@ -405,7 +396,7 @@ static int ShowController(vlc_object_t *p_this, const char *psz_variable, _audioSegmentedControl.hidden = YES; } -- (void)showGridAudioLibrary +- (void)showAudioLibrary { if (_mediaSourceView.superview != nil) { [_mediaSourceView removeFromSuperview]; @@ -413,43 +404,30 @@ static int ShowController(vlc_object_t *p_this, const char *psz_variable, if (_videoLibraryStackView.superview != nil) { [_videoLibraryStackView removeFromSuperview]; } - if (_audioLibrarySplitView.superview != nil) { - [_audioLibrarySplitView removeFromSuperview]; + if (_audioLibraryView.superview == nil) { + _audioLibraryView.translatesAutoresizingMaskIntoConstraints = NO; + [_libraryTargetView addSubview:_audioLibraryView]; + NSDictionary *dict = NSDictionaryOfVariableBindings(_audioLibraryView); + [_libraryTargetView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[_audioLibraryView(>=572.)]|" options:0 metrics:0 views:dict]]; + [_libraryTargetView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[_audioLibraryView(>=444.)]|" options:0 metrics:0 views:dict]]; } - if (_tiledAudioView.superview == nil) { - _tiledAudioView.translatesAutoresizingMaskIntoConstraints = NO; - [_libraryTargetView addSubview:_tiledAudioView]; - NSDictionary *dict = NSDictionaryOfVariableBindings(_tiledAudioView); - [_libraryTargetView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[_tiledAudioView(>=572.)]|" options:0 metrics:0 views:dict]]; - [_libraryTargetView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[_tiledAudioView(>=444.)]|" options:0 metrics:0 views:dict]]; - } - [_tiledAudioViewController reloadAppearance]; _librarySortButton.hidden = NO; _audioSegmentedControl.hidden = NO; -} -- (void)showListAudioLibrary -{ - if (_mediaSourceView.superview != nil) { - [_mediaSourceView removeFromSuperview]; - } - if (_videoLibraryStackView.superview != nil) { - [_videoLibraryStackView removeFromSuperview]; - } - if (_tiledAudioView.superview != nil) { - [_tiledAudioView removeFromSuperview]; - } - if (_audioLibrarySplitView.superview == nil) { - _audioLibrarySplitView.translatesAutoresizingMaskIntoConstraints = NO; - [_libraryTargetView addSubview:_audioLibrarySplitView]; - NSDictionary *dict = NSDictionaryOfVariableBindings(_audioLibrarySplitView); - [_libraryTargetView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[_audioLibrarySplitView(>=572.)]|" options:0 metrics:0 views:dict]]; - [_libraryTargetView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[_audioLibrarySplitView(>=444.)]|" options:0 metrics:0 views:dict]]; + if (self.gridVsListSegmentedControl.selectedSegment == 0) { + _audioLibrarySplitView.hidden = YES; + _audioCollectionViewScrollView.hidden = NO; + [_gridAudioViewController reloadAppearance]; + } else { + _audioLibrarySplitView.hidden = NO; + _audioLibrarySplitView.wantsLayer = YES; + _audioLibrarySplitView.layer.backgroundColor = [NSColor redColor].CGColor; + _audioCollectionViewScrollView.hidden = YES; + [_libraryAudioDataSource reloadAppearance]; + [_audioCollectionSelectionTableView reloadData]; } - [_libraryAudioDataSource reloadAppearance]; - [_audioCollectionSelectionTableView reloadData]; - _librarySortButton.hidden = NO; - _audioSegmentedControl.hidden = NO; + self.gridVsListSegmentedControl.target = self; + self.gridVsListSegmentedControl.action = @selector(segmentedControlAction:); } - (void)showMediaSourceAppearance @@ -457,11 +435,8 @@ static int ShowController(vlc_object_t *p_this, const char *psz_variable, if (_videoLibraryStackView.superview != nil) { [_videoLibraryStackView removeFromSuperview]; } - if (_audioLibrarySplitView.superview != nil) { - [_audioLibrarySplitView removeFromSuperview]; - } - if (_tiledAudioView.superview != nil) { - [_tiledAudioView removeFromSuperview]; + if (_audioLibraryView.superview != nil) { + [_audioLibraryView removeFromSuperview]; } if (_mediaSourceView.superview == nil) { _mediaSourceView.translatesAutoresizingMaskIntoConstraints = NO; _______________________________________________ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits