Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
15
Merge Requests
15
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
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
Steve Lhomme
VLC
Commits
7bf473dd
Commit
7bf473dd
authored
Jul 27, 2017
by
Marvin Scholz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: Fix initializing the Cells in Slider subclasses
parent
73c8dce2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
5 deletions
+25
-5
modules/gui/macosx/VLCDefaultValueSlider.m
modules/gui/macosx/VLCDefaultValueSlider.m
+8
-5
modules/gui/macosx/VLCSlider.m
modules/gui/macosx/VLCSlider.m
+17
-0
No files found.
modules/gui/macosx/VLCDefaultValueSlider.m
View file @
7bf473dd
...
...
@@ -28,18 +28,21 @@
-
(
instancetype
)
initWithCoder
:(
NSCoder
*
)
coder
{
if
([
coder
isKindOfClass
:
[
NSKeyedUnarchiver
class
]])
{
NSKeyedUnarchiver
*
keyedUnarchiver
=
(
id
)
coder
;
NSString
*
oldClass
=
NSStringFromClass
([
self
.
superclass
cellClass
]);
[
keyedUnarchiver
setClass
:[
VLCDefaultValueSliderCell
class
]
forClassName
:
oldClass
];
}
self
=
[
super
initWithCoder
:
coder
];
if
(
self
)
{
if
(
!
[
self
.
cell
isKindOfClass
:[
VLCDefaultValueSliderCell
class
]])
{
self
.
cell
=
[[
VLCDefaultValueSliderCell
alloc
]
init
];
}
_isScrollable
=
YES
;
}
return
self
;
}
+
(
Class
)
cellClass
{
return
[
VLCDefaultValueSliderCell
class
];
}
-
(
void
)
scrollWheel
:(
NSEvent
*
)
event
{
if
(
!
_isScrollable
)
...
...
modules/gui/macosx/VLCSlider.m
View file @
7bf473dd
...
...
@@ -26,6 +26,23 @@
@implementation
VLCSlider
-
(
instancetype
)
initWithCoder
:(
NSCoder
*
)
coder
{
self
=
[
super
initWithCoder
:
coder
];
if
(
self
)
{
if
(
!
[
self
.
cell
isKindOfClass
:[
VLCSliderCell
class
]])
{
self
.
cell
=
[[
VLCSliderCell
alloc
]
init
];
}
}
return
self
;
}
+
(
Class
)
cellClass
{
return
[
VLCSliderCell
class
];
}
// Workaround for 10.7
// http://stackoverflow.com/questions/3985816/custom-nsslidercell
-
(
void
)
setNeedsDisplayInRect
:(
NSRect
)
invalidRect
{
...
...
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