Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Transparent WebView



Scrap that as it gives the webview content transparency as well. You'll need to subclass window and set it such that the background is not drawn. I.e.:


- (id)initWithContentRect:(NSRect)contentRect styleMask:(unsigned int)aStyle
backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag
{
#pragma unused(aStyle)
if ( ( self = [super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask
backing:bufferingType defer:flag] ) )
{
[self setBackgroundColor:[NSColor clearColor]];
[self setAlphaValue:0.0];
[self setOpaque:NO];
[self setHasShadow:NO];
return self;
}
return nil;
}



On Apr 21, 2005, at 07:45, Adriaan Tijsseling wrote:

Did you set the window's transparency using setAlphaValue? That should be all you need.

On Apr 21, 2005, at 08:30, Craig Hunter wrote:

OK, so Safari in 10.3.9 allows a transparent window (see the Debug menu),
which works nicely when you embed CSS formatting for background transparency
in your HTML:


    <STYLE type=\"text/css\">
    BODY { background-color: transparent }
    </STYLE>

I have an app with a transparent window, but all WebViews have an opaque
white background by default. Anyone know a way to force the WebViews to
have a transparent background so that full transparency can be realized?? I
assume that if Safari Can do it, any WebView should be able to support it as
well.


Thanks,
Craig

-- Dr. Craig Hunter
NASA Langley Research Center
AAAC/Configuration Aerodynamics Branch
email@hidden  (new!!)
(757) 864-3020
(Dual G4 - OS X)


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webkitsdk-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webkitsdk-dev/ email@hidden


This email sent to email@hidden


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webkitsdk-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webkitsdk-dev/ email@hidden


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Webkitsdk-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webkitsdk-dev/email@hidden

This email sent to email@hidden
References: 
 >Transparent WebView (From: Craig Hunter <email@hidden>)
 >Re: Transparent WebView (From: Adriaan Tijsseling <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.