Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits: 98838a77 by Samuel Bassaly at 2021-06-24T14:52:26+00:00 macosx: Fix tiny bugs in volume control Fix a problem in the parsing string used for the volume control tooltip. The old string formatted a float as an int, leading to printing wrong values. Additionally, set the default value of the volume on startup to 1 (the correct value), instead of 0. Clean the LibraryWindow xib from 3 old variables, that were removed from the class, but not the xib. - - - - - 3 changed files: - modules/gui/macosx/UI/VLCLibraryWindow.xib - modules/gui/macosx/playlist/VLCPlayerController.m - modules/gui/macosx/windows/mainwindow/VLCMainWindowControlsBar.m Changes: ===================================== modules/gui/macosx/UI/VLCLibraryWindow.xib ===================================== @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES"> +<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="17701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES"> <dependencies> <deployment identifier="macosx"/> - <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/> + <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17701"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <objects> @@ -17,24 +17,24 @@ <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES" fullSizeContentView="YES"/> <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/> <rect key="contentRect" x="196" y="240" width="480" height="363"/> - <rect key="screenRect" x="0.0" y="0.0" width="1280" height="800"/> - <view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ"> - <rect key="frame" x="0.0" y="0.0" width="480" height="363"/> + <rect key="screenRect" x="0.0" y="0.0" width="1440" height="877"/> + <view key="contentView" wantsLayer="YES" misplaced="YES" id="EiT-Mj-1SZ"> + <rect key="frame" x="0.0" y="0.0" width="480" height="362"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <splitView autosaveName="librarywindowsplitview" dividerStyle="thin" vertical="YES" translatesAutoresizingMaskIntoConstraints="NO" id="u8g-jy-S4e"> - <rect key="frame" x="0.0" y="36" width="480" height="257"/> + <rect key="frame" x="0.0" y="36" width="480" height="256"/> <subviews> - <customView id="iSp-bV-w6B"> - <rect key="frame" x="0.0" y="0.0" width="242" height="257"/> + <customView misplaced="YES" id="iSp-bV-w6B"> + <rect key="frame" x="0.0" y="0.0" width="242" height="256"/> <autoresizingMask key="autoresizingMask"/> </customView> - <customView id="dus-WQ-AmE"> - <rect key="frame" x="243" y="0.0" width="237" height="257"/> + <customView misplaced="YES" id="dus-WQ-AmE"> + <rect key="frame" x="243" y="0.0" width="237" height="256"/> <autoresizingMask key="autoresizingMask"/> <subviews> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="TET-5r-zHx"> - <rect key="frame" x="18" y="230" width="37" height="17"/> + <rect key="frame" x="18" y="228" width="37" height="16"/> <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="fo5-R8-TeO"> <font key="font" metaFont="message"/> <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> @@ -42,7 +42,7 @@ </textFieldCell> </textField> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="mbV-My-cm7" customClass="VLCRoundedCornerTextField"> - <rect key="frame" x="182" y="230" width="37" height="17"/> + <rect key="frame" x="182" y="228" width="37" height="16"/> <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="4hq-fU-NXW"> <font key="font" metaFont="message"/> <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> @@ -50,16 +50,16 @@ </textFieldCell> </textField> <box verticalHuggingPriority="750" boxType="separator" translatesAutoresizingMaskIntoConstraints="NO" id="qmL-Ar-cj1"> - <rect key="frame" x="20" y="220" width="197" height="5"/> + <rect key="frame" x="20" y="218" width="197" height="5"/> </box> <scrollView borderType="none" autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Z7y-D0-11Q"> - <rect key="frame" x="0.0" y="63" width="237" height="151"/> + <rect key="frame" x="0.0" y="62" width="237" height="150"/> <clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="Vdr-bg-tuS"> - <rect key="frame" x="0.0" y="0.0" width="237" height="151"/> + <rect key="frame" x="0.0" y="0.0" width="237" height="150"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" multipleSelection="NO" autosaveColumns="NO" rowSizeStyle="automatic" viewBased="YES" id="Fr1-af-8gb" customClass="VLCPlaylistTableView"> - <rect key="frame" x="0.0" y="0.0" width="237" height="151"/> + <rect key="frame" x="0.0" y="0.0" width="237" height="150"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <size key="intercellSpacing" width="3" height="2"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> @@ -67,7 +67,6 @@ <tableColumns> <tableColumn width="234" minWidth="40" maxWidth="1000" id="gkH-E7-Nn4"> <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> @@ -83,7 +82,7 @@ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="dY4-Im-HRr"> - <rect key="frame" x="0.0" y="0.0" width="234" height="17"/> + <rect key="frame" x="0.0" y="1" width="234" height="16"/> <textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Table View Cell" id="vlq-wz-y8v"> <font key="font" metaFont="message"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> @@ -121,10 +120,10 @@ </scroller> </scrollView> <box verticalHuggingPriority="750" boxType="separator" translatesAutoresizingMaskIntoConstraints="NO" id="nAW-KH-ipk"> - <rect key="frame" x="20" y="52" width="197" height="5"/> + <rect key="frame" x="20" y="51" width="197" height="5"/> </box> <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="jg5-33-vH0"> - <rect key="frame" x="20" y="15" width="24" height="24"/> + <rect key="frame" x="20" y="14" width="24" height="24"/> <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="shuffleOn" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="J31-h3-U4s"> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> <font key="font" metaFont="system"/> @@ -134,7 +133,7 @@ </connections> </button> <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="8zF-Wo-H79"> - <rect key="frame" x="64" y="15" width="24" height="24"/> + <rect key="frame" x="64" y="14" width="24" height="24"/> <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="repeatOff" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="ol2-xi-TEm"> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> <font key="font" metaFont="system"/> @@ -144,7 +143,7 @@ </connections> </button> <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="cih-xp-HmY"> - <rect key="frame" x="202" y="15" width="15" height="30"/> + <rect key="frame" x="202" y="14" width="15" height="30"/> <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="NSTouchBarDeleteTemplate" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="OjM-W9-IrQ"> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> <font key="font" metaFont="system"/> @@ -154,10 +153,10 @@ </connections> </button> <customView hidden="YES" translatesAutoresizingMaskIntoConstraints="NO" id="VFI-oW-dMZ" customClass="VLCDragDropView"> - <rect key="frame" x="0.0" y="55" width="237" height="167"/> + <rect key="frame" x="0.0" y="54" width="237" height="166"/> <subviews> <imageView translatesAutoresizingMaskIntoConstraints="NO" id="cTV-Wf-TfJ" customClass="VLCDropDisabledImageView"> - <rect key="frame" x="63" y="28" width="112" height="112"/> + <rect key="frame" x="63" y="27" width="112" height="112"/> <constraints> <constraint firstAttribute="width" constant="112" id="IvG-i0-rbs"/> <constraint firstAttribute="height" constant="112" id="dO8-Iv-pDk"/> @@ -165,7 +164,7 @@ <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="dropzone" id="sHO-XQ-hCU"/> </imageView> <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="SWh-4E-Qtf"> - <rect key="frame" x="56" y="-10" width="125" height="32"/> + <rect key="frame" x="56" y="-11" width="125" height="32"/> <buttonCell key="cell" type="push" title="Open media..." bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="UUH-HF-Iqc"> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> <font key="font" metaFont="system"/> @@ -183,7 +182,7 @@ </constraints> </customView> <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="244-FS-P3T"> - <rect key="frame" x="171" y="23" width="21" height="14"/> + <rect key="frame" x="171" y="22" width="21" height="14"/> <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="NSTextRulerLineHeightIncrease" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="qDZ-84-3uy"> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> <font key="font" metaFont="system"/> @@ -401,7 +400,7 @@ </constraints> </customView> <customView translatesAutoresizingMaskIntoConstraints="NO" id="6gW-0d-ymm" userLabel="Option Bar"> - <rect key="frame" x="0.0" y="294" width="480" height="33"/> + <rect key="frame" x="0.0" y="293" width="480" height="33"/> <subviews> <segmentedControl verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="lIg-5J-C5F"> <rect key="frame" x="6" y="3" width="67" height="24"/> @@ -565,18 +564,15 @@ <outlet property="mediaSourceView" destination="eHd-Q9-F8D" id="gfU-Jp-eFr"/> <outlet property="mediaToolBar" destination="pr3-TD-J2z" id="Chi-03-Fgd"/> <outlet property="openMediaButton" destination="SWh-4E-Qtf" id="sIZ-xo-GLA"/> - <outlet property="optionBar" destination="6gW-0d-ymm" id="rkK-gK-uY0"/> <outlet property="playQueueToggle" destination="IaO-se-D0g" id="tqY-YM-KQC"/> <outlet property="playlistCounterTextField" destination="mbV-My-cm7" id="ZYU-Jq-Z8R"/> <outlet property="playlistDragDropView" destination="VFI-oW-dMZ" id="gVc-mu-f8T"/> <outlet property="playlistTableView" destination="Fr1-af-8gb" id="yaB-Ab-jrx"/> <outlet property="playlistView" destination="dus-WQ-AmE" id="fTF-HP-Chb"/> - <outlet property="playqueue" destination="IaO-se-D0g" id="NMT-lQ-7x7"/> <outlet property="recentVideoLibraryCollectionView" destination="hnE-Hj-MZo" id="Fko-5v-1bC"/> <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="test" destination="IaO-se-D0g" id="7nK-TX-QPm"/> <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"/> @@ -608,7 +604,7 @@ <rect key="frame" x="0.0" y="498" width="242" height="310"/> <clipView key="contentView" copiesOnScroll="NO" id="J5s-sy-il6"> <rect key="frame" x="0.0" y="0.0" width="242" height="310"/> - <autoresizingMask key="autoresizingMask"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <collectionView selectable="YES" id="hnE-Hj-MZo"> <rect key="frame" x="0.0" y="0.0" width="242" height="310"/> @@ -638,7 +634,7 @@ <rect key="frame" x="0.0" y="0.0" width="242" height="498"/> <clipView key="contentView" copiesOnScroll="NO" id="OKa-dt-1yY"> <rect key="frame" x="0.0" y="0.0" width="242" height="498"/> - <autoresizingMask key="autoresizingMask"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <collectionView selectable="YES" id="B8x-e8-7zp"> <rect key="frame" x="0.0" y="0.0" width="242" height="498"/> @@ -689,7 +685,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"/> @@ -700,7 +696,6 @@ <tableColumns> <tableColumn width="525" minWidth="40" maxWidth="1000" id="89Q-Wg-BdA"> <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> @@ -748,7 +743,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"/> @@ -816,7 +811,7 @@ <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"/> + <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"/> @@ -827,7 +822,6 @@ <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> @@ -876,7 +870,7 @@ <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"/> + <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"/> @@ -887,7 +881,6 @@ <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> @@ -941,7 +934,7 @@ <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"/> + <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"/> ===================================== modules/gui/macosx/playlist/VLCPlayerController.m ===================================== @@ -603,6 +603,8 @@ static int BossCallback(vlc_object_t *p_this, _playerVoutListenerID = vlc_player_vout_AddListener(_p_player, &player_vout_callbacks, (__bridge void *)self); + + _volume = VLCVolumeDefault; libvlc_int_t *libvlc = vlc_object_instance(getIntf()); var_AddCallback(libvlc, "intf-boss", BossCallback, (__bridge void *)self); ===================================== modules/gui/macosx/windows/mainwindow/VLCMainWindowControlsBar.m ===================================== @@ -129,10 +129,10 @@ BOOL b_muted = _playerController.mute; if (b_muted) - f_volume = 0.; + f_volume = 0.f; [self.volumeSlider setFloatValue: f_volume]; - NSString *volumeTooltip = [NSString stringWithFormat:_NS("Volume: %i %%"), f_volume * 100]; + NSString *volumeTooltip = [NSString stringWithFormat:_NS("Volume: %i %%"), (int)(f_volume * 100.0f)]; [self.volumeSlider setToolTip:volumeTooltip]; [self.volumeSlider setEnabled: !b_muted]; View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/98838a772486c168c375e1ea93cf89081646b766 -- View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/98838a772486c168c375e1ea93cf89081646b766 You're receiving this email because of your account on code.videolan.org.
_______________________________________________ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits