Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
e61c78e6
Commit
e61c78e6
authored
Jul 22, 2013
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: cleanup previous commit and fix position of tick, tweak appearance
refs #8628
parent
66bf1c6e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
12 deletions
+13
-12
modules/gui/macosx/CoreInteraction.m
modules/gui/macosx/CoreInteraction.m
+0
-2
modules/gui/macosx/fspanel.m
modules/gui/macosx/fspanel.m
+2
-2
modules/gui/macosx/misc.h
modules/gui/macosx/misc.h
+0
-1
modules/gui/macosx/misc.m
modules/gui/macosx/misc.m
+11
-7
No files found.
modules/gui/macosx/CoreInteraction.m
View file @
e61c78e6
...
...
@@ -538,7 +538,6 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
return
0
;
float
volume
=
playlist_VolumeGet
(
pl_Get
(
p_intf
));
NSLog
(
@"return vol %f"
,
volume
);
return
lroundf
(
volume
*
AOUT_VOLUME_DEFAULT
);
}
...
...
@@ -553,7 +552,6 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
i_value
=
self
.
maxVolume
;
float
f_value
=
i_value
/
(
float
)
AOUT_VOLUME_DEFAULT
;
NSLog
(
@"set vol %f"
,
f_value
);
playlist_VolumeSet
(
pl_Get
(
p_intf
),
f_value
);
}
...
...
modules/gui/macosx/fspanel.m
View file @
e61c78e6
...
...
@@ -454,12 +454,12 @@
s_rc
.
size
.
height
=
12
;
o_fs_volumeSlider
=
[[
VLCFSVolumeSlider
alloc
]
initWithFrame
:
s_rc
];
[
o_fs_volumeSlider
setMinValue
:
0
];
[
o_fs_volumeSlider
setMaxValue
:
AOUT_VOLUME_MAX
];
[
o_fs_volumeSlider
setMaxValue
:
[[
VLCCoreInteraction
sharedInstance
]
maxVolume
]
];
[
o_fs_volumeSlider
setIntValue
:
AOUT_VOLUME_DEFAULT
];
[
o_fs_volumeSlider
setContinuous
:
YES
];
[
o_fs_volumeSlider
setTarget
:
self
];
[
o_fs_volumeSlider
setAction
:
@selector
(
fsVolumeSliderUpdate
:)];
[
o_fs_volumeSlider
setUsesBrightArtwork
:
YES
];
[
o_fs_volumeSlider
setUsesBrightArtwork
:
NO
];
[[
o_fs_volumeSlider
cell
]
accessibilitySetOverrideValue
:
_NS
(
"Volume"
)
forAttribute
:
NSAccessibilityTitleAttribute
];
[[
o_fs_volumeSlider
cell
]
accessibilitySetOverrideValue
:
_NS
(
"Click and move the mouse while keeping the button pressed to use this slider to change the volume."
)
forAttribute
:
NSAccessibilityDescriptionAttribute
];
[
self
addSubview
:
o_fs_volumeSlider
];
...
...
modules/gui/macosx/misc.h
View file @
e61c78e6
...
...
@@ -123,7 +123,6 @@
@interface
VLCVolumeSliderCommon
:
NSSlider
{
BOOL
_usesBrightArtwork
;
CGFloat
_maximumVolume
;
}
@property
(
readwrite
,
nonatomic
)
BOOL
usesBrightArtwork
;
...
...
modules/gui/macosx/misc.m
View file @
e61c78e6
...
...
@@ -547,24 +547,28 @@ void _drawFrameInRect(NSRect frameRect)
-
(
void
)
drawFullVolumeMarker
{
CGFloat
maxAudioVol
=
self
.
maxValue
/
AOUT_VOLUME_DEFAULT
;
if
(
maxAudioVol
<
1
.)
return
;
NSRect
frame
=
[
self
frame
];
NSColor
*
drawingColor
;
// for bright artwork, a black color is used and vice versa
if
(
_usesBrightArtwork
)
drawingColor
=
[[
NSColor
whiteColor
]
colorWithAlphaComponent
:.
8
];
drawingColor
=
[[
NSColor
blackColor
]
colorWithAlphaComponent
:.
4
];
else
drawingColor
=
[[
NSColor
blackColor
]
colorWithAlphaComponent
:.
6
];
drawingColor
=
[[
NSColor
whiteColor
]
colorWithAlphaComponent
:.
4
];
NSBezierPath
*
bezierPath
=
[
NSBezierPath
bezierPath
];
float
fullVolPos
=
frame
.
size
.
width
/
2
.;
CGFloat
maxAudioVol
=
self
.
maxValue
/
AOUT_VOLUME_DEFAULT
;
CGFloat
sliderRange
=
frame
.
size
.
width
-
[
self
knobThickness
];
CGFloat
sliderOrigin
=
[
self
knobThickness
]
/
2
.;
if
((
maxAudioVol
-
1
.)
>
0
)
fullVolPos
+=
((
maxAudioVol
-
1
.)
*
2000
)
/
fullVolPos
;
CGFloat
fullVolPos
=
1
.
/
maxAudioVol
*
sliderRange
+
sliderOrigin
;
[
bezierPath
moveToPoint
:
NSMakePoint
(
fullVolPos
,
frame
.
size
.
height
-
3
.)];
[
bezierPath
lineToPoint
:
NSMakePoint
(
fullVolPos
,
3
.)];
[
bezierPath
lineToPoint
:
NSMakePoint
(
fullVolPos
,
2
.)];
[
bezierPath
closePath
];
bezierPath
.
lineWidth
=
1
.;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment