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
20bfa22b
Commit
20bfa22b
authored
Feb 15, 2012
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OSX GUI: simplify resizeWindow()
parent
f4fb3707
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
19 deletions
+16
-19
modules/gui/macosx/MainWindow.m
modules/gui/macosx/MainWindow.m
+16
-19
No files found.
modules/gui/macosx/MainWindow.m
View file @
20bfa22b
...
@@ -1245,27 +1245,24 @@ static VLCMainWindow *_o_sharedInstance = nil;
...
@@ -1245,27 +1245,24 @@ static VLCMainWindow *_o_sharedInstance = nil;
-
(
void
)
resizeWindow
-
(
void
)
resizeWindow
{
{
if
(
!
b_fullscreen
&&
!
(
OSX_LION
&&
[
NSApp
presentationOptions
]
==
NSApplicationPresentationFullScreen
&&
b_nativeFullscreenMode
)
)
if
(
b_fullscreen
||
(
OSX_LION
&&
[
NSApp
presentationOptions
]
==
NSApplicationPresentationFullScreen
&&
b_nativeFullscreenMode
)
)
{
return
;
NSPoint
topleftbase
;
NSPoint
topleftscreen
;
NSRect
new_frame
;
topleftbase
.
x
=
0
;
topleftbase
.
y
=
[
self
frame
].
size
.
height
;
topleftscreen
=
[
self
convertBaseToScreen
:
topleftbase
];
/* Calculate the window's new size */
new_frame
.
size
.
width
=
[
self
frame
].
size
.
width
-
[
o_video_view
frame
].
size
.
width
+
nativeVideoSize
.
width
;
if
(
b_dark_interface
)
new_frame
.
size
.
height
=
[
self
frame
].
size
.
height
-
[
o_video_view
frame
].
size
.
height
+
nativeVideoSize
.
height
+
[
o_titlebar_view
frame
].
size
.
height
;
else
new_frame
.
size
.
height
=
[
self
frame
].
size
.
height
-
[
o_video_view
frame
].
size
.
height
+
nativeVideoSize
.
height
;
new_frame
.
origin
.
x
=
topleftscreen
.
x
;
NSPoint
topleftbase
=
NSMakePoint
(
0
,
[
self
frame
].
size
.
height
)
;
new_frame
.
origin
.
y
=
topleftscreen
.
y
-
new_frame
.
size
.
height
;
NSPoint
topleftscreen
=
[
self
convertBaseToScreen
:
topleftbase
]
;
[[
self
animator
]
setFrame
:
new_frame
display
:
YES
];
/* Calculate the window's new size */
}
float
w
=
[
self
frame
].
size
.
width
-
[
o_video_view
frame
].
size
.
width
+
nativeVideoSize
.
width
;
float
h
=
[
self
frame
].
size
.
height
-
[
o_video_view
frame
].
size
.
height
+
nativeVideoSize
.
height
;
if
(
b_dark_interface
)
h
+=
[
o_titlebar_view
frame
].
size
.
height
;
NSRect
new_frame
=
NSMakeRect
(
topleftscreen
.
x
,
topleftscreen
.
y
-
h
,
w
,
h
);
[[
self
animator
]
setFrame
:
new_frame
display
:
YES
];
}
}
-
(
void
)
setNativeVideoSize
:(
NSSize
)
size
-
(
void
)
setNativeVideoSize
:(
NSSize
)
size
...
...
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