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
77442ae2
Commit
77442ae2
authored
Jun 25, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx/fspanel: optimize image rendering for sliders and background
no user-visible change.
parent
7324469b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
10 deletions
+20
-10
modules/gui/macosx/fspanel.h
modules/gui/macosx/fspanel.h
+1
-1
modules/gui/macosx/fspanel.m
modules/gui/macosx/fspanel.m
+19
-9
No files found.
modules/gui/macosx/fspanel.h
View file @
77442ae2
...
@@ -71,7 +71,6 @@
...
@@ -71,7 +71,6 @@
-
(
BOOL
)
isDisplayed
;
-
(
BOOL
)
isDisplayed
;
-
(
void
)
setVoutWasUpdated
:
(
int
)
i_screen
;
-
(
void
)
setVoutWasUpdated
:
(
int
)
i_screen
;
-
(
void
)
adaptWindowSizeToScreen
;
@end
@end
@interface
VLCFSPanelView
:
NSView
@interface
VLCFSPanelView
:
NSView
...
@@ -80,6 +79,7 @@
...
@@ -80,6 +79,7 @@
NSButton
*
o_prev
,
*
o_next
,
*
o_bwd
,
*
o_fwd
,
*
o_play
,
*
o_fullscreen
;
NSButton
*
o_prev
,
*
o_next
,
*
o_bwd
,
*
o_fwd
,
*
o_play
,
*
o_fullscreen
;
NSTextField
*
o_streamTitle_txt
,
*
o_streamPosition_txt
;
NSTextField
*
o_streamTitle_txt
,
*
o_streamPosition_txt
;
NSSlider
*
o_fs_timeSlider
,
*
o_fs_volumeSlider
;
NSSlider
*
o_fs_timeSlider
,
*
o_fs_volumeSlider
;
NSImage
*
o_background_img
,
*
o_vol_sld_img
,
*
o_vol_mute_img
,
*
o_vol_max_img
,
*
o_time_sld_img
;
}
}
-
(
id
)
initWithFrame
:
(
NSRect
)
frameRect
;
-
(
id
)
initWithFrame
:
(
NSRect
)
frameRect
;
-
(
void
)
drawRect
:
(
NSRect
)
rect
;
-
(
void
)
drawRect
:
(
NSRect
)
rect
;
...
...
modules/gui/macosx/fspanel.m
View file @
77442ae2
...
@@ -472,11 +472,22 @@
...
@@ -472,11 +472,22 @@
s_rc
.
size
.
width
=
65
;
s_rc
.
size
.
width
=
65
;
addTextfield
(
VLCTimeField
,
o_streamPosition_txt
,
NSRightTextAlignment
,
systemFontOfSize
,
whiteColor
);
addTextfield
(
VLCTimeField
,
o_streamPosition_txt
,
NSRightTextAlignment
,
systemFontOfSize
,
whiteColor
);
o_background_img
=
[[
NSImage
imageNamed
:
@"fs_background"
]
retain
];
o_vol_sld_img
=
[[
NSImage
imageNamed
:
@"fs_volume_slider_bar"
]
retain
];
o_vol_mute_img
=
[[
NSImage
imageNamed
:
@"fs_volume_mute"
]
retain
];
o_vol_max_img
=
[[
NSImage
imageNamed
:
@"fs_volume_max"
]
retain
];
o_time_sld_img
=
[[
NSImage
imageNamed
:
@"fs_time_slider"
]
retain
];
return
view
;
return
view
;
}
}
-
(
void
)
dealloc
-
(
void
)
dealloc
{
{
[
o_background_img
release
];
[
o_vol_sld_img
release
];
[
o_vol_mute_img
release
];
[
o_vol_max_img
release
];
[
o_time_sld_img
release
];
[
o_fs_timeSlider
release
];
[
o_fs_timeSlider
release
];
[
o_fs_volumeSlider
release
];
[
o_fs_volumeSlider
release
];
[
o_prev
release
];
[
o_prev
release
];
...
@@ -576,26 +587,25 @@
...
@@ -576,26 +587,25 @@
}
}
#define addImage(image, _x, _y, mode, _width) \
#define addImage(image, _x, _y, mode, _width) \
img = [NSImage imageNamed:image]; \
image_rect.size = [image size]; \
image_rect.size = [img size]; \
image_rect.origin.x = 0; \
image_rect.origin.x = 0; \
image_rect.origin.y = 0; \
image_rect.origin.y = 0; \
frame.origin.x = _x; \
frame.origin.x = _x; \
frame.origin.y = _y; \
frame.origin.y = _y; \
frame.size = [im
g size];
\
frame.size = [im
age size];
\
if( _width ) frame.size.width = _width; \
if( _width ) frame.size.width = _width; \
[im
g
drawInRect:frame fromRect:image_rect operation:mode fraction:1];
[im
age
drawInRect:frame fromRect:image_rect operation:mode fraction:1];
-
(
void
)
drawRect
:(
NSRect
)
rect
-
(
void
)
drawRect
:(
NSRect
)
rect
{
{
NSRect
frame
=
[
self
frame
];
NSRect
frame
=
[
self
frame
];
NSRect
image_rect
;
NSRect
image_rect
;
NSImage
*
img
;
NSImage
*
img
;
addImage
(
@"fs_background"
,
0
,
0
,
NSCompositeCopy
,
0
);
addImage
(
o_background_img
,
0
,
0
,
NSCompositeCopy
,
0
);
addImage
(
@"fs_volume_slider_bar"
,
26
,
23
,
NSCompositeSourceOver
,
0
);
addImage
(
o_vol_sld_img
,
26
,
23
,
NSCompositeSourceOver
,
0
);
addImage
(
@"fs_volume_mute"
,
16
,
18
,
NSCompositeSourceOver
,
0
);
addImage
(
o_vol_mute_img
,
16
,
18
,
NSCompositeSourceOver
,
0
);
addImage
(
@"fs_volume_max"
,
124
,
18
,
NSCompositeSourceOver
,
0
);
addImage
(
o_vol_max_img
,
124
,
18
,
NSCompositeSourceOver
,
0
);
addImage
(
@"fs_time_slider"
,
15
,
53
,
NSCompositeSourceOver
,
0
);
addImage
(
o_time_sld_img
,
15
,
53
,
NSCompositeSourceOver
,
0
);
}
}
@end
@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