Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
d34e5434
Commit
d34e5434
authored
Jan 05, 2008
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MacOSX/VLC_app: Nicely slide in/out the playlist.
parent
30ee7100
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
391 additions
and
332 deletions
+391
-332
extras/MacOSX/VLC_app/English.lproj/MainWindow.xib
extras/MacOSX/VLC_app/English.lproj/MainWindow.xib
+322
-322
extras/MacOSX/VLC_app/Sources/VLCAppAdditions.h
extras/MacOSX/VLC_app/Sources/VLCAppAdditions.h
+5
-1
extras/MacOSX/VLC_app/Sources/VLCAppAdditions.m
extras/MacOSX/VLC_app/Sources/VLCAppAdditions.m
+21
-0
extras/MacOSX/VLC_app/Sources/VLCMainWindow.m
extras/MacOSX/VLC_app/Sources/VLCMainWindow.m
+41
-9
extras/MacOSX/VLC_app/VLC.xcodeproj/project.pbxproj
extras/MacOSX/VLC_app/VLC.xcodeproj/project.pbxproj
+2
-0
No files found.
extras/MacOSX/VLC_app/English.lproj/MainWindow.xib
View file @
d34e5434
This diff is collapsed.
Click to expand it.
extras/MacOSX/VLC_app/Sources/VLCAppAdditions.h
View file @
d34e5434
...
...
@@ -39,6 +39,10 @@
/* Split view that supports slider animation */
@interface
VLCOneSplitView
:
NSSplitView
{
BOOL
fixedCursorDuringResize
;
}
@property
(
assign
)
BOOL
fixedCursorDuringResize
;
-
(
float
)
sliderPosition
;
-
(
void
)
setSliderPosition
:(
float
)
newPosition
;
@end
extras/MacOSX/VLC_app/Sources/VLCAppAdditions.m
View file @
d34e5434
...
...
@@ -84,6 +84,7 @@
/* Split view that supports slider animation */
@implementation
VLCOneSplitView
@synthesize
fixedCursorDuringResize
;
-
(
float
)
sliderPosition
{
return
[[[
self
subviews
]
objectAtIndex
:
0
]
frame
].
size
.
height
;
...
...
@@ -100,5 +101,25 @@
}
return
[
super
defaultAnimationForKey
:
key
];
}
-
(
void
)
adjustSubviews
{
if
(
!
fixedCursorDuringResize
)
{
[
super
adjustSubviews
];
return
;
}
NSRect
frame0
=
[[[
self
subviews
]
objectAtIndex
:
0
]
frame
];
NSRect
frame1
=
[[[
self
subviews
]
objectAtIndex
:
1
]
frame
];
frame1
.
size
.
height
=
[
self
bounds
].
size
.
height
-
frame0
.
size
.
height
-
[
self
dividerThickness
];
if
(
frame1
.
size
.
height
<
0
.
)
{
float
delta
=
-
frame1
.
size
.
height
;
frame1
.
size
.
height
=
0
.;
frame0
.
size
.
height
-=
delta
;
frame1
.
origin
.
y
=
frame0
.
size
.
height
+
[
self
dividerThickness
];
[[[
self
subviews
]
objectAtIndex
:
1
]
setFrame
:
frame0
];
}
[[[
self
subviews
]
objectAtIndex
:
1
]
setFrame
:
frame1
];
}
@end
extras/MacOSX/VLC_app/Sources/VLCMainWindow.m
View file @
d34e5434
...
...
@@ -28,6 +28,10 @@
#import "VLCBrowsableVideoView.h"
#import "VLCAppAdditions.h"
@interface
VLCMainWindow
(
NavigatorViewHidingShowing
)
@property
float
contentHeight
;
/* animatable, keep the mainSplitView cursor at the same place, enabling playlist(navigator) togling */
@end
/******************************************************************************
* VLCMainWindow (CategoriesListDelegate)
*/
...
...
@@ -280,28 +284,26 @@
if
(
visible
)
{
if
(
!
navigatorHeight
)
navigatorHeight
=
100
.
f
;
/* Show the navigator view (playlist view) */
if
(
navigatorHeight
<
100
.
f
)
navigatorHeight
=
100
.
f
;
if
(
!
[
self
videoViewVisible
]
&&
!
[
self
navigatorViewVisible
]
)
{
/* Nothing is visible, only our toolbar */
NSRect
frame
=
[
self
frame
];
frame
.
origin
.
y
-
=
navigatorHeight
;
frame
.
origin
.
y
+
=
navigatorHeight
;
frame
.
size
.
height
+=
navigatorHeight
;
[[
self
animator
]
setFrame
:
frame
display
:
YES
];
}
else
[[
mainSplitView
animator
]
setSliderPosition
:([
mainSplitView
bounds
].
size
.
height
-
navigatorHeight
-
[
mainSplitView
dividerThickness
])
];
[[
self
animator
]
setContentHeight
:[
mainSplitView
bounds
].
size
.
height
+
navigatorHeight
+
[
mainSplitView
dividerThickness
]
];
/* Hack, because sliding cause some glitches */
[
navigatorView
moveSubviewsToVisible
];
}
else
{
/* Hide the navigator view (playlist view) */
navigatorHeight
=
[
navigatorView
bounds
].
size
.
height
;
NSRect
frame0
=
[
self
frame
];
NSRect
frame1
=
[[[
mainSplitView
subviews
]
objectAtIndex
:
1
]
frame
];
frame0
.
size
.
height
-=
frame1
.
size
.
height
;
frame0
.
origin
.
y
+=
frame1
.
size
.
height
;
frame1
.
size
.
height
=
0
;
[[
mainSplitView
animator
]
setSliderPosition
:([
mainSplitView
bounds
].
size
.
height
)];
[[
self
animator
]
setContentHeight
:[
mainSplitView
bounds
].
size
.
height
-
navigatorHeight
+
[
mainSplitView
dividerThickness
]];
/* Hack, because sliding cause some glitches */
[
navigatorView
moveSubviewsToVisible
];
}
...
...
@@ -355,6 +357,36 @@
}
@end
@implementation
VLCMainWindow
(
NavigatorViewHidingShowing
)
-
(
float
)
contentHeight
{
return
[
self
contentRectForFrameRect
:[
self
frame
]].
size
.
height
;
}
-
(
void
)
setContentHeight
:(
float
)
height
{
/* Set the Height while keeping the mainSplitView at his current position */
[
mainSplitView
setFixedCursorDuringResize
:
YES
];
NSRect
contentRect
=
[
self
contentRectForFrameRect
:[
self
frame
]];
float
delta
=
height
-
contentRect
.
size
.
height
;
contentRect
.
size
.
height
=
height
;
NSRect
windowFrame
=
[
self
frameRectForContentRect
:
contentRect
];
windowFrame
.
origin
.
y
-=
delta
;
windowFrame
=
[
self
constrainFrameRect
:
windowFrame
toScreen
:[
self
screen
]];
[
self
setFrame
:
windowFrame
display
:
YES
];
[
mainSplitView
setFixedCursorDuringResize
:
NO
];
}
+
(
id
)
defaultAnimationForKey
:(
NSString
*
)
key
{
if
([
key
isEqualToString
:
@"contentHeight"
])
{
return
[
CABasicAnimation
animation
];
}
return
[
super
defaultAnimationForKey
:
key
];
}
@end
@implementation
VLCMainWindow
(
NSToolbarDelegating
)
/* Our item identifiers */
static
NSString
*
VLCToolbarMediaControl
=
@"VLCToolbarMediaControl"
;
...
...
extras/MacOSX/VLC_app/VLC.xcodeproj/project.pbxproj
View file @
d34e5434
...
...
@@ -596,6 +596,7 @@
C01FCF4F08A954540054247B
/* Debug */
=
{
isa
=
XCBuildConfiguration
;
buildSettings
=
{
ARCHS
=
"$(NATIVE_ARCH_32_BIT)"
;
GCC_WARN_ABOUT_RETURN_TYPE
=
YES
;
GCC_WARN_UNUSED_VARIABLE
=
YES
;
PREBINDING
=
NO
;
...
...
@@ -605,6 +606,7 @@
C01FCF5008A954540054247B
/* Release */
=
{
isa
=
XCBuildConfiguration
;
buildSettings
=
{
ARCHS
=
"$(NATIVE_ARCH_32_BIT)"
;
GCC_WARN_ABOUT_RETURN_TYPE
=
YES
;
GCC_WARN_UNUSED_VARIABLE
=
YES
;
PREBINDING
=
NO
;
...
...
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