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
343498be
Commit
343498be
authored
Sep 16, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: simplify progress bar resizing code and fix certain re-drawing issues
parent
84e4fd26
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
763 additions
and
267 deletions
+763
-267
extras/package/macosx/Resources/English.lproj/MainMenu.xib
extras/package/macosx/Resources/English.lproj/MainMenu.xib
+731
-201
modules/gui/macosx/MainWindow.h
modules/gui/macosx/MainWindow.h
+1
-0
modules/gui/macosx/MainWindow.m
modules/gui/macosx/MainWindow.m
+31
-66
No files found.
extras/package/macosx/Resources/English.lproj/MainMenu.xib
View file @
343498be
This diff is collapsed.
Click to expand it.
modules/gui/macosx/MainWindow.h
View file @
343498be
...
...
@@ -50,6 +50,7 @@
IBOutlet
id
o_volume_track_view
;
IBOutlet
id
o_volume_down_btn
;
IBOutlet
id
o_volume_up_btn
;
IBOutlet
id
o_progress_view
;
IBOutlet
id
o_time_sld
;
IBOutlet
id
o_time_sld_fancygradient_view
;
IBOutlet
id
o_time_fld
;
...
...
modules/gui/macosx/MainWindow.m
View file @
343498be
...
...
@@ -396,16 +396,9 @@ static VLCMainWindow *_o_sharedInstance = nil;
moveItem
(
o_time_fld
);
#undef moveItem
#define enlargeItem(item) \
frame = [item frame]; \
frame.size.width = f_width + frame.size.width; \
[item setFrame: frame]
enlargeItem
(
o_time_sld
);
enlargeItem
(
o_progress_bar
);
enlargeItem
(
o_time_sld_background
);
enlargeItem
(
o_time_sld_fancygradient_view
);
#undef enlargeItem
frame
=
[
o_progress_view
frame
];
frame
.
size
.
width
=
f_width
+
frame
.
size
.
width
;
[
o_progress_view
setFrame
:
frame
];
[
o_fullscreen_btn
removeFromSuperviewWithoutNeedingDisplay
];
}
else
{
...
...
@@ -705,20 +698,13 @@ static VLCMainWindow *_o_sharedInstance = nil;
moveItem
(
o_shuffle_btn
);
#undef moveItem
#define resizeItem(item) \
frame = [item frame]; \
frame.size.width = frame.size.width - f_space; \
frame.origin.x = frame.origin.x + f_space; \
if (b_fast) \
[item setFrame: frame]; \
else \
[[item animator] setFrame: frame]
resizeItem
(
o_time_sld
);
resizeItem
(
o_progress_bar
);
resizeItem
(
o_time_sld_background
);
resizeItem
(
o_time_sld_fancygradient_view
);
#undef resizeItem
frame
=
[
o_progress_view
frame
];
frame
.
size
.
width
=
frame
.
size
.
width
-
f_space
;
frame
.
origin
.
x
=
frame
.
origin
.
x
+
f_space
;
if
(
b_fast
)
[
o_progress_view
setFrame
:
frame
];
else
[[
o_progress_view
animator
]
setFrame
:
frame
];
if
(
b_dark_interface
)
{
[[
o_fwd_btn
animator
]
setImage
:[
NSImage
imageNamed
:
@"forward-6btns-dark"
]];
...
...
@@ -797,20 +783,13 @@ static VLCMainWindow *_o_sharedInstance = nil;
moveItem
(
o_shuffle_btn
);
#undef moveItem
#define resizeItem(item) \
frame = [item frame]; \
frame.size.width = frame.size.width + f_space; \
frame.origin.x = frame.origin.x - f_space; \
if (b_fast) \
[item setFrame: frame]; \
else \
[[item animator] setFrame: frame]
resizeItem
(
o_time_sld
);
resizeItem
(
o_progress_bar
);
resizeItem
(
o_time_sld_background
);
resizeItem
(
o_time_sld_fancygradient_view
);
#undef resizeItem
frame
=
[
o_progress_view
frame
];
frame
.
size
.
width
=
frame
.
size
.
width
+
f_space
;
frame
.
origin
.
x
=
frame
.
origin
.
x
-
f_space
;
if
(
b_fast
)
[
o_progress_view
setFrame
:
frame
];
else
[[
o_progress_view
animator
]
setFrame
:
frame
];
if
(
b_dark_interface
)
{
[[
o_fwd_btn
animator
]
setImage
:[
NSImage
imageNamed
:
@"forward-3btns-dark"
]];
...
...
@@ -864,20 +843,13 @@ static VLCMainWindow *_o_sharedInstance = nil;
[[
o_shuffle_btn
animator
]
setHidden
:
NO
];
}
#define resizeItem(item) \
frame = [item frame]; \
frame.size.width = frame.size.width - f_space; \
frame.origin.x = frame.origin.x + f_space; \
if (b_fast) \
[item setFrame: frame]; \
else \
[[item animator] setFrame: frame]
resizeItem
(
o_time_sld
);
resizeItem
(
o_progress_bar
);
resizeItem
(
o_time_sld_background
);
resizeItem
(
o_time_sld_fancygradient_view
);
#undef resizeItem
frame
=
[
o_progress_view
frame
];
frame
.
size
.
width
=
frame
.
size
.
width
-
f_space
;
frame
.
origin
.
x
=
frame
.
origin
.
x
+
f_space
;
if
(
b_fast
)
[
o_progress_view
setFrame
:
frame
];
else
[[
o_progress_view
animator
]
setFrame
:
frame
];
}
-
(
void
)
removePlaymodeButtons
:(
BOOL
)
b_fast
...
...
@@ -898,20 +870,13 @@ static VLCMainWindow *_o_sharedInstance = nil;
frame
.
size
.
width
++
;
[
o_playlist_btn
setFrame
:
frame
];
#define resizeItem(item) \
frame = [item frame]; \
frame.size.width = frame.size.width + f_space; \
frame.origin.x = frame.origin.x - f_space; \
if (b_fast) \
[item setFrame: frame]; \
else \
[[item animator] setFrame: frame]
resizeItem
(
o_time_sld
);
resizeItem
(
o_progress_bar
);
resizeItem
(
o_time_sld_background
);
resizeItem
(
o_time_sld_fancygradient_view
);
#undef resizeItem
frame
=
[
o_progress_view
frame
];
frame
.
size
.
width
=
frame
.
size
.
width
+
f_space
;
frame
.
origin
.
x
=
frame
.
origin
.
x
-
f_space
;
if
(
b_fast
)
[
o_progress_view
setFrame
:
frame
];
else
[[
o_progress_view
animator
]
setFrame
:
frame
];
}
#pragma mark -
...
...
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