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
8fd45605
Commit
8fd45605
authored
Jul 23, 2013
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: implement snap-in for volume sliders (refs #8628)
parent
863f310d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
7 deletions
+47
-7
extras/package/macosx/Resources/English.lproj/MainMenu.xib
extras/package/macosx/Resources/English.lproj/MainMenu.xib
+18
-7
modules/gui/macosx/fspanel.m
modules/gui/macosx/fspanel.m
+10
-0
modules/gui/macosx/misc.h
modules/gui/macosx/misc.h
+3
-0
modules/gui/macosx/misc.m
modules/gui/macosx/misc.m
+16
-0
No files found.
extras/package/macosx/Resources/English.lproj/MainMenu.xib
View file @
8fd45605
...
...
@@ -2,9 +2,9 @@
<archive
type=
"com.apple.InterfaceBuilder3.Cocoa.XIB"
version=
"7.10"
>
<data>
<int
key=
"IBDocument.SystemTarget"
>
1050
</int>
<string
key=
"IBDocument.SystemVersion"
>
12
D78
</string>
<string
key=
"IBDocument.SystemVersion"
>
12
E55
</string>
<string
key=
"IBDocument.InterfaceBuilderVersion"
>
851
</string>
<string
key=
"IBDocument.AppKitVersion"
>
1187.3
7
</string>
<string
key=
"IBDocument.AppKitVersion"
>
1187.3
9
</string>
<string
key=
"IBDocument.HIToolboxVersion"
>
626.00
</string>
<object
class=
"NSMutableDictionary"
key=
"IBDocument.PluginVersions"
>
<bool
key=
"EncodedWithXMLCoder"
>
YES
</bool>
...
...
@@ -21,12 +21,12 @@
</object>
<object
class=
"NSMutableArray"
key=
"IBDocument.EditedObjectIDs"
>
<bool
key=
"EncodedWithXMLCoder"
>
YES
</bool>
<integer
value=
"21"
/>
<integer
value=
"4850"
/>
<integer
value=
"5260"
/>
<integer
value=
"2730"
/>
<integer
value=
"29"
/>
<integer
value=
"2461"
/>
<integer
value=
"4850"
/>
<integer
value=
"2730"
/>
<integer
value=
"21"
/>
</object>
<object
class=
"NSArray"
key=
"IBDocument.PluginDependencies"
>
<bool
key=
"EncodedWithXMLCoder"
>
YES
</bool>
...
...
@@ -714,7 +714,7 @@
</object>
<bool
key=
"NSEnabled"
>
YES
</bool>
<object
class=
"NSSliderCell"
key=
"NSCell"
id=
"180862414"
>
<int
key=
"NSCellFlags"
>
-208011238
4
</int>
<int
key=
"NSCellFlags"
>
6737126
4
</int>
<int
key=
"NSCellFlags2"
>
131072
</int>
<object
class=
"NSMutableString"
key=
"NSContents"
>
<characters
key=
"NS.bytes"
/>
...
...
@@ -727,7 +727,7 @@
<reference
key=
"NSControlView"
ref=
"788281303"
/>
<double
key=
"NSMaxValue"
>
512
</double>
<double
key=
"NSMinValue"
>
0.0
</double>
<double
key=
"NSValue"
>
25
6
</double>
<double
key=
"NSValue"
>
25
1.95348837209303
</double>
<double
key=
"NSAltIncValue"
>
0.0
</double>
<int
key=
"NSNumberOfTickMarks"
>
0
</int>
<int
key=
"NSTickMarkPosition"
>
1
</int>
...
...
@@ -12181,6 +12181,7 @@ LCAuLi4</string>
<string>
4272.ImportedFromIB2
</string>
<string>
4274.IBPluginDependency
</string>
<string>
4275.IBPluginDependency
</string>
<string>
4276.CustomClassName
</string>
<string>
4276.IBPluginDependency
</string>
<string>
4278.IBPluginDependency
</string>
<string>
4279.IBPluginDependency
</string>
...
...
@@ -13099,6 +13100,7 @@ LCAuLi4</string>
<boolean
value=
"YES"
/>
<string>
com.apple.InterfaceBuilder.CocoaPlugin
</string>
<string>
com.apple.InterfaceBuilder.CocoaPlugin
</string>
<string>
VolumeSliderCell
</string>
<string>
com.apple.InterfaceBuilder.CocoaPlugin
</string>
<string>
com.apple.InterfaceBuilder.CocoaPlugin
</string>
<string>
com.apple.InterfaceBuilder.CocoaPlugin
</string>
...
...
@@ -13710,6 +13712,10 @@ LCAuLi4</string>
<string
key=
"minorKey"
>
../../../modules/gui/macosx/SPMediaKeyTap.h
</string>
</object>
</object>
<object
class=
"IBPartialClassDescription"
>
<string
key=
"className"
>
NSView
</string>
<reference
key=
"sourceIdentifier"
ref=
"516086310"
/>
</object>
<object
class=
"IBPartialClassDescription"
>
<string
key=
"className"
>
NSWindow
</string>
<object
class=
"IBClassDescriptionSource"
key=
"sourceIdentifier"
>
...
...
@@ -16852,6 +16858,11 @@ LCAuLi4</string>
<string
key=
"superclassName"
>
NSTextField
</string>
<reference
key=
"sourceIdentifier"
ref=
"925772039"
/>
</object>
<object
class=
"IBPartialClassDescription"
>
<string
key=
"className"
>
VolumeSliderCell
</string>
<string
key=
"superclassName"
>
NSSliderCell
</string>
<reference
key=
"sourceIdentifier"
ref=
"516086310"
/>
</object>
</object>
<object
class=
"NSMutableArray"
key=
"referencedPartialClassDescriptionsV3.2+"
>
<bool
key=
"EncodedWithXMLCoder"
>
YES
</bool>
...
...
modules/gui/macosx/fspanel.m
View file @
8fd45605
...
...
@@ -710,6 +710,16 @@
*****************************************************************************/
@implementation
VLCFSVolumeSlider
-
(
id
)
initWithFrame
:(
NSRect
)
frame
{
self
=
[
super
initWithFrame
:
frame
];
if
(
self
)
{
[
self
setCell
:[[[
VolumeSliderCell
alloc
]
init
]
autorelease
]];
}
return
self
;
}
-
(
void
)
drawKnobInRect
:(
NSRect
)
knobRect
{
NSRect
image_rect
;
...
...
modules/gui/macosx/misc.h
View file @
8fd45605
...
...
@@ -133,6 +133,9 @@
@end
@interface
VolumeSliderCell
:
NSSliderCell
@end
/*****************************************************************************
* ITSlider
*****************************************************************************/
...
...
modules/gui/macosx/misc.m
View file @
8fd45605
...
...
@@ -585,6 +585,22 @@ void _drawFrameInRect(NSRect frameRect)
@end
@implementation
VolumeSliderCell
-
(
BOOL
)
continueTracking
:(
NSPoint
)
lastPoint
at
:(
NSPoint
)
currentPoint
inView
:(
NSView
*
)
controlView
{
VLCVolumeSliderCommon
*
o_slider
=
(
VLCVolumeSliderCommon
*
)
controlView
;
CGFloat
fullVolumePos
=
[
o_slider
fullVolumePos
]
+
2
.;
CGPoint
snapToPoint
=
currentPoint
;
if
(
ABS
(
fullVolumePos
-
currentPoint
.
x
)
<=
4
.)
snapToPoint
.
x
=
fullVolumePos
;
return
[
super
continueTracking
:
lastPoint
at
:
snapToPoint
inView
:
controlView
];
}
@end
/*****************************************************************************
* ITSlider
*****************************************************************************/
...
...
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