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
dd19842e
Commit
dd19842e
authored
Jun 25, 2012
by
Felix Paul Kühne
Committed by
Felix Paul Kühne
Jun 27, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx/fspanel: another minor optimization and simplification of the image drawing code
(cherry picked from commit
3d7bdcde
)
parent
b8992268
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
modules/gui/macosx/fspanel.m
modules/gui/macosx/fspanel.m
+10
-9
No files found.
modules/gui/macosx/fspanel.m
View file @
dd19842e
...
...
@@ -586,26 +586,27 @@
[[
VLCCoreInteraction
sharedInstance
]
setVolume
:
[
sender
intValue
]];
}
#define addImage(image, _x, _y, mode, _width) \
image_rect.size = [image size]; \
#define addImage(image, _x, _y, mode) \
image_size = [image size]; \
image_rect.size = image_size; \
image_rect.origin.x = 0; \
image_rect.origin.y = 0; \
frame.origin.x = _x; \
frame.origin.y = _y; \
frame.size = [image size]; \
if( _width ) frame.size.width = _width; \
frame.size = image_size; \
[image drawInRect:frame fromRect:image_rect operation:mode fraction:1];
-
(
void
)
drawRect
:(
NSRect
)
rect
{
NSRect
frame
=
[
self
frame
];
NSRect
image_rect
;
NSSize
image_size
;
NSImage
*
img
;
addImage
(
o_background_img
,
0
,
0
,
NSCompositeCopy
,
0
);
addImage
(
o_vol_sld_img
,
26
,
23
,
NSCompositeSourceOver
,
0
);
addImage
(
o_vol_mute_img
,
16
,
18
,
NSCompositeSourceOver
,
0
);
addImage
(
o_vol_max_img
,
124
,
18
,
NSCompositeSourceOver
,
0
);
addImage
(
o_time_sld_img
,
15
,
53
,
NSCompositeSourceOver
,
0
);
addImage
(
o_background_img
,
0
,
0
,
NSCompositeCopy
);
addImage
(
o_vol_sld_img
,
26
,
23
,
NSCompositeSourceOver
);
addImage
(
o_vol_mute_img
,
16
,
18
,
NSCompositeSourceOver
);
addImage
(
o_vol_max_img
,
124
,
18
,
NSCompositeSourceOver
);
addImage
(
o_time_sld_img
,
15
,
53
,
NSCompositeSourceOver
);
}
@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