Browse Source

macosx: introduce constants for volume default and maximum internal to the module

pull/91/head
Felix Paul Kühne 7 years ago
parent
commit
5738d7a0b6
  1. 3
      modules/gui/macosx/playlist/VLCPlayerController.h
  2. 3
      modules/gui/macosx/playlist/VLCPlayerController.m
  3. 3
      modules/gui/macosx/windows/mainwindow/VLCMainWindowControlsBar.m
  4. 6
      modules/gui/macosx/windows/video/VLCFSPanelController.m

3
modules/gui/macosx/playlist/VLCPlayerController.h

@ -227,6 +227,9 @@ extern NSString *VLCPlayerVolumeChanged;
*/
extern NSString *VLCPlayerMuteChanged;
extern const CGFloat VLCVolumeMaximum;
extern const CGFloat VLCVolumeDefault;
@interface VLCPlayerController : NSObject
- (instancetype)initWithPlayer:(vlc_player_t *)player;

3
modules/gui/macosx/playlist/VLCPlayerController.m

@ -71,6 +71,9 @@ NSString *VLCPlayerListOfVideoOutputThreadsChanged = @"VLCPlayerListOfVideoOutpu
NSString *VLCPlayerVolumeChanged = @"VLCPlayerVolumeChanged";
NSString *VLCPlayerMuteChanged = @"VLCPlayerMuteChanged";
const CGFloat VLCVolumeMaximum = 2.;
const CGFloat VLCVolumeDefault = 1.;
@interface VLCPlayerController ()
{
vlc_player_t *_p_player;

3
modules/gui/macosx/windows/mainwindow/VLCMainWindowControlsBar.m

@ -29,9 +29,6 @@
#import "playlist/VLCPlaylistController.h"
#import "playlist/VLCPlayerController.h"
CGFloat VLCVolumeMaximum = 2.;
CGFloat VLCVolumeDefault = 1.;
/*****************************************************************************
* VLCMainWindowControlsBar
*

6
modules/gui/macosx/windows/video/VLCFSPanelController.m

@ -25,8 +25,6 @@
#import "VLCFSPanelController.h"
#import <vlc_aout.h>
#import "extensions/NSString+Helpers.h"
#import "main/VLCMain.h"
#import "playlist/VLCPlaylistController.h"
@ -150,9 +148,9 @@ static NSString *kAssociatedFullscreenRect = @"VLCFullscreenAssociatedWindowRect
_NS("Adjust the current playback position"));
/* Setup other controls */
[_volumeSlider setMaxValue:2.0];
[_volumeSlider setMaxValue:VLCVolumeMaximum];
[_volumeSlider setFloatValue:_playerController.volume];
[_volumeSlider setDefaultValue:1.0];
[_volumeSlider setDefaultValue:VLCVolumeDefault];
/* Identifier to store the state of the remaining or total time label,
* this is the same identifier as used for the window playback cotrols

Loading…
Cancel
Save