Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
105ab7dd
Commit
105ab7dd
authored
Dec 27, 2011
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: added a resize control to the main window (not in use when linking against the 10.7 SDK)
parent
f305a1f9
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
311 additions
and
545 deletions
+311
-545
Makefile.am
Makefile.am
+1
-0
extras/package/macosx/Resources/English.lproj/MainMenu.xib
extras/package/macosx/Resources/English.lproj/MainMenu.xib
+265
-544
extras/package/macosx/Resources/mainwindow_dark/window-resize.png
...ackage/macosx/Resources/mainwindow_dark/window-resize.png
+0
-0
extras/package/macosx/vlc.xcodeproj/project.pbxproj
extras/package/macosx/vlc.xcodeproj/project.pbxproj
+4
-0
modules/gui/macosx/MainWindow.h
modules/gui/macosx/MainWindow.h
+1
-0
modules/gui/macosx/MainWindow.m
modules/gui/macosx/MainWindow.m
+5
-1
modules/gui/macosx/MainWindowTitle.h
modules/gui/macosx/MainWindowTitle.h
+6
-0
modules/gui/macosx/MainWindowTitle.m
modules/gui/macosx/MainWindowTitle.m
+29
-0
No files found.
Makefile.am
View file @
105ab7dd
...
...
@@ -288,6 +288,7 @@ EXTRA_DIST += \
extras/package/macosx/Resources/mainwindow_dark/window-minimize-on.png
\
extras/package/macosx/Resources/mainwindow_dark/window-minimize-over.png
\
extras/package/macosx/Resources/mainwindow_dark/window-minimize.png
\
extras/package/macosx/Resources/mainwindow_dark/window-resize.png
\
extras/package/macosx/Resources/mainwindow_dark/window-zoom-on.png
\
extras/package/macosx/Resources/mainwindow_dark/window-zoom-over.png
\
extras/package/macosx/Resources/mainwindow_dark/window-zoom.png
\
...
...
extras/package/macosx/Resources/English.lproj/MainMenu.xib
View file @
105ab7dd
This diff is collapsed.
Click to expand it.
extras/package/macosx/Resources/mainwindow_dark/window-resize.png
0 → 100644
View file @
105ab7dd
189 Bytes
extras/package/macosx/vlc.xcodeproj/project.pbxproj
View file @
105ab7dd
...
...
@@ -150,6 +150,7 @@
CC0433D213B28C8C00D7D52E
/* spref_cone_Interface_64.png in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CC0433CC13B28C8C00D7D52E
/* spref_cone_Interface_64.png */
;
};
CC0433D313B28C8C00D7D52E
/* spref_cone_Subtitles_64.png in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CC0433CD13B28C8C00D7D52E
/* spref_cone_Subtitles_64.png */
;
};
CC0433D413B28C8C00D7D52E
/* spref_cone_Video_64.png in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CC0433CE13B28C8C00D7D52E
/* spref_cone_Video_64.png */
;
};
CC11373514A7921A005DF2F3
/* window-resize.png in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CC11373414A7921A005DF2F3
/* window-resize.png */
;
};
CC2DB09A14A7550D0050A055
/* window-close-on.png in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CC2DB09114A7550D0050A055
/* window-close-on.png */
;
};
CC2DB09B14A7550D0050A055
/* window-close-over.png in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CC2DB09214A7550D0050A055
/* window-close-over.png */
;
};
CC2DB09C14A7550D0050A055
/* window-close.png in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CC2DB09314A7550D0050A055
/* window-close.png */
;
};
...
...
@@ -430,6 +431,7 @@
CC0CD0E013DE0EAE00B0D90D
/* PXSourceList.m */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.objc
;
name
=
PXSourceList.m
;
path
=
../../../modules/gui/macosx/PXSourceList.m
;
sourceTree
=
"<group>"
;
};
CC0CD0E113DE0EAE00B0D90D
/* PXSourceListDataSource.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
name
=
PXSourceListDataSource.h
;
path
=
../../../modules/gui/macosx/PXSourceListDataSource.h
;
sourceTree
=
"<group>"
;
};
CC0CD0E213DE0EAE00B0D90D
/* PXSourceListDelegate.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
name
=
PXSourceListDelegate.h
;
path
=
../../../modules/gui/macosx/PXSourceListDelegate.h
;
sourceTree
=
"<group>"
;
};
CC11373414A7921A005DF2F3
/* window-resize.png */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
image.png
;
name
=
"window-resize.png"
;
path
=
"Resources/mainwindow_dark/window-resize.png"
;
sourceTree
=
"<group>"
;
};
CC1941240B9C1F8400635F6B
/* QTKit.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
name
=
QTKit.framework
;
path
=
/System/Library/Frameworks/QTKit.framework
;
sourceTree
=
"<absolute>"
;
};
CC1C41D00D9BAD7F002728FA
/* noart.png */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
image.png
;
name
=
noart.png
;
path
=
Resources/noart.png
;
sourceTree
=
"<group>"
;
};
CC2DB09114A7550D0050A055
/* window-close-on.png */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
image.png
;
name
=
"window-close-on.png"
;
path
=
"Resources/mainwindow_dark/window-close-on.png"
;
sourceTree
=
"<group>"
;
};
...
...
@@ -826,6 +828,7 @@
CC2DB09414A7550D0050A055
/* window-minimize-on.png */
,
CC2DB09514A7550D0050A055
/* window-minimize-over.png */
,
CC2DB09614A7550D0050A055
/* window-minimize.png */
,
CC11373414A7921A005DF2F3
/* window-resize.png */
,
CC2DB09714A7550D0050A055
/* window-zoom-on.png */
,
CC2DB09814A7550D0050A055
/* window-zoom-over.png */
,
CC2DB09914A7550D0050A055
/* window-zoom.png */
,
...
...
@@ -1352,6 +1355,7 @@
CC6FA91914A78AE700353C5F
/* window-fullscreen-on.png in Resources */
,
CC6FA91A14A78AE700353C5F
/* window-fullscreen-over.png in Resources */
,
CC6FA91B14A78AE700353C5F
/* window-fullscreen.png in Resources */
,
CC11373514A7921A005DF2F3
/* window-resize.png in Resources */
,
);
runOnlyForDeploymentPostprocessing
=
0
;
};
...
...
modules/gui/macosx/MainWindow.h
View file @
105ab7dd
...
...
@@ -69,6 +69,7 @@
IBOutlet
VLCFSPanel
*
o_fspanel
;
IBOutlet
id
o_titlebar_view
;
IBOutlet
id
o_resize_view
;
BOOL
b_dark_interface
;
BOOL
b_nativeFullscreenMode
;
...
...
modules/gui/macosx/MainWindow.m
View file @
105ab7dd
...
...
@@ -76,6 +76,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
{
#ifdef MAC_OS_X_VERSION_10_7
styleMask
=
NSBorderlessWindowMask
|
NSResizableWindowMask
;
[
o_resize_view
removeFromSuperviewWithoutNeedingDisplay
];
#else
styleMask
=
NSBorderlessWindowMask
;
#endif
...
...
@@ -239,7 +240,10 @@ static VLCMainWindow *_o_sharedInstance = nil;
[
self
setExcludedFromWindowsMenu
:
YES
];
[
self
setAcceptsMouseMovedEvents
:
YES
];
// Set that here as IB seems to be buggy
[
self
setContentMinSize
:
NSMakeSize
(
500
.,
288
.)];
if
(
b_dark_interface
)
[
self
setContentMinSize
:
NSMakeSize
(
500
.,
(
288
.
+
[
o_titlebar_view
frame
].
size
.
height
))];
else
[
self
setContentMinSize
:
NSMakeSize
(
500
.,
288
.)];
[
self
setTitle
:
_NS
(
"VLC media player"
)];
[
o_playlist_btn
setEnabled
:
NO
];
o_temp_view
=
[[
NSView
alloc
]
init
];
...
...
modules/gui/macosx/MainWindowTitle.h
View file @
105ab7dd
...
...
@@ -48,3 +48,9 @@
{
}
@end
@interface
VLCResizeControl
:
NSImageView
{
}
@end
modules/gui/macosx/MainWindowTitle.m
View file @
105ab7dd
...
...
@@ -132,3 +132,32 @@
}
@end
@implementation
VLCResizeControl
-
(
void
)
mouseDragged
:(
NSEvent
*
)
theEvent
{
NSRect
windowFrame
=
[[
self
window
]
frame
];
CGFloat
deltaX
,
deltaY
,
oldOriginY
;
deltaX
=
[
theEvent
deltaX
];
deltaY
=
[
theEvent
deltaY
];
oldOriginY
=
windowFrame
.
origin
.
y
;
windowFrame
.
origin
.
y
=
(
oldOriginY
+
windowFrame
.
size
.
height
)
-
(
windowFrame
.
size
.
height
+
deltaY
);
windowFrame
.
size
.
width
+=
deltaX
;
windowFrame
.
size
.
height
+=
deltaY
;
NSSize
winMinSize
=
[
self
window
].
minSize
;
if
(
windowFrame
.
size
.
width
<
winMinSize
.
width
)
windowFrame
.
size
.
width
=
winMinSize
.
width
;
if
(
windowFrame
.
size
.
height
<
winMinSize
.
height
)
{
windowFrame
.
size
.
height
=
winMinSize
.
height
;
windowFrame
.
origin
.
y
=
oldOriginY
;
}
[[
self
window
]
setFrame
:
windowFrame
display
:
YES
animate
:
NO
];
}
@end
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