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

Marvin Scholz epirat07 at gmail.com
Sun Dec 11 18:26:22 CET 2016


On 11 Dec 2016, at 18:21, Marvin Scholz wrote:

> This commit will use the new VLCDefaultValueSlider for the
> VLSFSPanelController volume slider.
> ---
>  .../package/macosx/Resources/English.lproj/VLCFullScreenPanel.xib   | 
> 6 +++---
>  modules/gui/macosx/VLCFSPanelController.h                           | 
> 3 ++-
>  modules/gui/macosx/VLCFSPanelController.m                           | 
> 1 +
>  3 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git 
> a/extras/package/macosx/Resources/English.lproj/VLCFullScreenPanel.xib 
> b/extras/package/macosx/Resources/English.lproj/VLCFullScreenPanel.xib
> index 54df100..27b88aa 100644
> --- 
> a/extras/package/macosx/Resources/English.lproj/VLCFullScreenPanel.xib
> +++ 
> b/extras/package/macosx/Resources/English.lproj/VLCFullScreenPanel.xib
> @@ -1,10 +1,10 @@
>  <?xml version="1.0" encoding="UTF-8"?>
> -<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" 
> toolsVersion="11542" systemVersion="16A323" 
> targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" 
> useAutolayout="YES" customObjectInstantitationMethod="direct">
> +<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" 
> toolsVersion="11542" systemVersion="16B2657" 
> targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" 
> useAutolayout="YES" customObjectInstantitationMethod="direct">
>      <dependencies>
>          <deployment identifier="macosx"/>
> -        <development version="7000" identifier="xcode"/>
>          <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" 
> version="11542"/>
>          <capability name="Aspect ratio constraints" 
> minToolsVersion="5.1"/>
> +        <capability name="documents saved in the Xcode 8 format" 
> minToolsVersion="8.0"/>

Of course this is not appropriate, removed in my local version of the 
commit. (Xcode keeps adding this whenever I open an xib file)

>          <capability name="system font weights other than Regular or 
> Bold" minToolsVersion="7.0"/>
>      </dependencies>
>      <objects>
> @@ -80,7 +80,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 670b49a..83901dd 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
>
> @@ -44,7 +45,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 35f149e..d396957 100644
> --- a/modules/gui/macosx/VLCFSPanelController.m
> +++ b/modules/gui/macosx/VLCFSPanelController.m
> @@ -76,6 +76,7 @@ - (void)windowDidLoad
>
>      [_volumeSlider setMaxValue:[[VLCCoreInteraction sharedInstance] 
> maxVolume]];
>      [_volumeSlider setIntValue:AOUT_VOLUME_DEFAULT];
> +    [_volumeSlider setDefaultValue:AOUT_VOLUME_DEFAULT];
>  }
>
>  #pragma mark -
> -- 
> 2.9.3 (Apple Git-75)


More information about the vlc-devel mailing list