[vlc-devel] [PATCH 2/2] macosx: Use the new slider for fscontroller volume

Marvin Scholz epirat07 at gmail.com
Thu Dec 15 22:07:18 CET 2016


This commit will use the new VLCDefaultValueSlider for the
VLSFSPanelController volume slider.
---
 extras/package/macosx/Resources/English.lproj/VLCFullScreenPanel.xib | 2 +-
 modules/gui/macosx/VLCFSPanelController.h                            | 3 ++-
 modules/gui/macosx/VLCFSPanelController.m                            | 1 +
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/extras/package/macosx/Resources/English.lproj/VLCFullScreenPanel.xib b/extras/package/macosx/Resources/English.lproj/VLCFullScreenPanel.xib
index f9f5423..a917607 100644
--- a/extras/package/macosx/Resources/English.lproj/VLCFullScreenPanel.xib
+++ b/extras/package/macosx/Resources/English.lproj/VLCFullScreenPanel.xib
@@ -81,7 +81,7 @@
                                     <action selector="jumpBackward:" target="-2" id="ft8-Or-fZy"/>
                                 </connections>
                             </button>
-                            <slider verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Ihl-7x-5mN">
+                            <slider verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Ihl-7x-5mN" customClass="VLCDefaultValueSlider">
                                 <rect key="frame" x="50" y="13" width="80" height="16"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="15" id="2ZX-Ma-yc0"/>
diff --git a/modules/gui/macosx/VLCFSPanelController.h b/modules/gui/macosx/VLCFSPanelController.h
index 90f9728..070b42b 100644
--- a/modules/gui/macosx/VLCFSPanelController.h
+++ b/modules/gui/macosx/VLCFSPanelController.h
@@ -28,6 +28,7 @@
 
 #import "misc.h"
 #import "Windows.h"
+#import "VLCDefaultValueSlider.h"
 
 @interface VLCFSPanelController : NSWindowController
 
@@ -45,7 +46,7 @@
 @property IBOutlet VLCTimeField *elapsedTime;
 @property IBOutlet VLCTimeField *remainingOrTotalTime;
 @property IBOutlet NSSlider     *timeSlider;
- at property IBOutlet NSSlider     *volumeSlider;
+ at property IBOutlet VLCDefaultValueSlider *volumeSlider;
 
 @property (assign) IBOutlet NSLayoutConstraint *heightMaxConstraint;
 
diff --git a/modules/gui/macosx/VLCFSPanelController.m b/modules/gui/macosx/VLCFSPanelController.m
index 19a7f91..3c4c637 100644
--- a/modules/gui/macosx/VLCFSPanelController.m
+++ b/modules/gui/macosx/VLCFSPanelController.m
@@ -116,6 +116,7 @@ - (void)setupControls
     /* Setup other controls */
     [_volumeSlider setMaxValue:[[VLCCoreInteraction sharedInstance] maxVolume]];
     [_volumeSlider setIntValue:AOUT_VOLUME_DEFAULT];
+    [_volumeSlider setDefaultValue:AOUT_VOLUME_DEFAULT];
 }
 
 #undef setupButton
-- 
2.10.1 (Apple Git-78)



More information about the vlc-devel mailing list