[vlc-commits] mac plugin: minor cleanup
Felix Paul Kühne
git at videolan.org
Mon Feb 17 22:10:53 CET 2014
npapi-vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Mon Feb 17 21:55:02 2014 +0100| [651f3577a794b9431fa7f9a3cdc15925ebdcbffd] | committer: Felix Paul Kühne
mac plugin: minor cleanup
> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=651f3577a794b9431fa7f9a3cdc15925ebdcbffd
---
npapi/vlcplugin_mac.mm | 7 +++----
npapi/vlcwindowless_mac.cpp | 1 -
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/npapi/vlcplugin_mac.mm b/npapi/vlcplugin_mac.mm
index 66ae0a8..05a6e25 100644
--- a/npapi/vlcplugin_mac.mm
+++ b/npapi/vlcplugin_mac.mm
@@ -502,7 +502,7 @@ bool VlcPluginMac::handle_event(void *event)
// draw gradient
CGImageRef gradient = createImageNamed(@"gradient");
- CGContextDrawImage(cgContext, CGRectMake(0., 0., self.bounds.size.width, 150.), gradient);
+ CGContextDrawImage(cgContext, CGRectMake(0., 0., windowWidth, 150.), gradient);
CGImageRelease(gradient);
// draw info text
@@ -533,7 +533,6 @@ bool VlcPluginMac::handle_event(void *event)
(const void **)&keys,
(const void **)&values,
2, NULL, NULL);
- //CGContextSetGrayFillColor(cgContext, .8, 1.);
// draw version string
CFStringRef arch;
@@ -555,11 +554,11 @@ bool VlcPluginMac::handle_event(void *event)
CGImageRef cone = createImageNamed(@"cone");
CGFloat coneWidth = CGImageGetWidth(cone);
CGFloat coneHeight = CGImageGetHeight(cone);
- if (self.bounds.size.height <= 320.) {
+ if (windowHeight <= 320.) {
coneWidth = coneWidth / 2.;
coneHeight = coneHeight / 2.;
}
- CGContextDrawImage(cgContext, CGRectMake((self.bounds.size.width - coneWidth) / 2., (self.bounds.size.height - coneHeight) / 2., coneWidth, coneHeight), cone);
+ CGContextDrawImage(cgContext, CGRectMake((windowWidth - coneWidth) / 2., (windowHeight - coneHeight) / 2., coneWidth, coneHeight), cone);
CGImageRelease(cone);
#else
// draw a black rect
diff --git a/npapi/vlcwindowless_mac.cpp b/npapi/vlcwindowless_mac.cpp
index c42c28c..53d1802 100644
--- a/npapi/vlcwindowless_mac.cpp
+++ b/npapi/vlcwindowless_mac.cpp
@@ -114,7 +114,6 @@ void VlcWindowlessMac::drawNoPlayback(CGContextRef cgContext)
(const void **)&keys,
(const void **)&values,
2, NULL, NULL);
- //CGContextSetGrayFillColor(cgContext, .8, 1.);
// draw version string
CFStringRef arch;
More information about the vlc-commits
mailing list