Skip to content

Commit 9bd9a33

Browse files
committed
volume percentage in volume popover
1 parent 5711789 commit 9bd9a33

File tree

2 files changed

+25
-8
lines changed

2 files changed

+25
-8
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Doing so isn't fatal (it's not a secret), but it is annoying for other contribut
4040
* All albums on the server can now be browsed through the server albums view.
4141
* Add some accessibility annotations to various tables and labels.
4242
* Fix accessibility (i.e. VoiceOver) with the album list.
43+
* The volume is shown as a percentage in the popover.
4344
* Track ratings are shown with stars and can be set from the inspector.
4445
* Fix ratings getting reset when fetching from the server.
4546
* Fix album information not getting pulled in from tracks on search.

Submariner/Database.xib

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -832,12 +832,12 @@ DQ
832832
</connections>
833833
</popover>
834834
<customView id="Y4Y-TV-6ce" userLabel="Volume Popover View">
835-
<rect key="frame" x="0.0" y="0.0" width="286" height="32"/>
835+
<rect key="frame" x="0.0" y="0.0" width="286" height="59"/>
836836
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
837837
<subviews>
838838
<button imageHugsTitle="YES" verticalHuggingPriority="750" id="RQW-nU-T8g">
839-
<rect key="frame" x="19" y="4" width="26" height="23"/>
840-
<autoresizingMask key="autoresizingMask"/>
839+
<rect key="frame" x="19" y="31" width="26" height="23"/>
840+
<autoresizingMask key="autoresizingMask" flexibleMinY="YES"/>
841841
<buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="speaker" catalog="system" imagePosition="only" alignment="center" borderStyle="border" inset="2" id="tbS-r3-CVa">
842842
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
843843
<font key="font" metaFont="system"/>
@@ -847,8 +847,8 @@ DQ
847847
</connections>
848848
</button>
849849
<button imageHugsTitle="YES" verticalHuggingPriority="750" id="uWd-YM-CxM">
850-
<rect key="frame" x="236" y="4" width="31" height="23"/>
851-
<autoresizingMask key="autoresizingMask"/>
850+
<rect key="frame" x="236" y="31" width="31" height="23"/>
851+
<autoresizingMask key="autoresizingMask" flexibleMinY="YES"/>
852852
<buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="speaker.wave.2" catalog="system" imagePosition="only" alignment="center" borderStyle="border" inset="2" id="2Se-ec-wf1">
853853
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
854854
<font key="font" metaFont="system"/>
@@ -858,8 +858,8 @@ DQ
858858
</connections>
859859
</button>
860860
<slider verticalHuggingPriority="750" id="rNC-wE-QO3">
861-
<rect key="frame" x="50" y="0.0" width="181" height="28"/>
862-
<autoresizingMask key="autoresizingMask"/>
861+
<rect key="frame" x="50" y="27" width="181" height="28"/>
862+
<autoresizingMask key="autoresizingMask" flexibleMinY="YES"/>
863863
<sliderCell key="cell" continuous="YES" state="on" alignment="left" maxValue="1" doubleValue="0.5" tickMarkPosition="above" sliderType="linear" id="eCr-CU-Ykk"/>
864864
<connections>
865865
<action selector="setVolume:" target="-2" id="dQr-O0-Dud"/>
@@ -870,8 +870,24 @@ DQ
870870
</binding>
871871
</connections>
872872
</slider>
873+
<textField toolTip="Volume percentage" focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="9Ks-Zr-JRY">
874+
<rect key="frame" x="125" y="9" width="33" height="16"/>
875+
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
876+
<textFieldCell key="cell" lineBreakMode="clipping" title="50%" id="qwI-Me-nIk">
877+
<numberFormatter key="formatter" formatterBehavior="default10_4" numberStyle="percent" formatWidth="-1" minimumIntegerDigits="1" maximumIntegerDigits="2000000000" id="y7j-wX-1qn" userLabel="Volume Percentage Number Formatter">
878+
<integer key="multiplier" value="100"/>
879+
</numberFormatter>
880+
<font key="font" metaFont="system"/>
881+
<color key="textColor" name="tertiaryLabelColor" catalog="System" colorSpace="catalog"/>
882+
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
883+
</textFieldCell>
884+
<accessibility description="Volume percentage"/>
885+
<connections>
886+
<binding destination="297" name="value" keyPath="values.playerVolume" id="bFN-P2-nI6"/>
887+
</connections>
888+
</textField>
873889
</subviews>
874-
<point key="canvasLocation" x="778" y="-169"/>
890+
<point key="canvasLocation" x="572" y="-364.5"/>
875891
</customView>
876892
<menu id="Fe1-K4-0De" userLabel="Source List Menu">
877893
<connections>

0 commit comments

Comments
 (0)