• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSWindow - Sheets - background alpha value
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSWindow - Sheets - background alpha value


  • Subject: Re: NSWindow - Sheets - background alpha value
  • From: PGM <email@hidden>
  • Date: Sun, 25 Nov 2007 22:22:01 +0100


How do I override the Leopard defaults to display sheets with an alpha of 1.0?


My application uses a lot of NSWindow sheets - for a good reason.

I do NOT want a semi-transparent background, nor do my users.


Make the contentView of your window a custom view where you fill the rect with a solid colour. I actually used this to get rid of the pinstripes in Tiger, and it is not transparent in Leopard. I post the code down here, though that might be superfluous as it is really simple.


Cheers, Patrick

@interface PMPanelBackgroundView : NSView {

}

@end


#import "PMPanelBackgroundView.h"


@implementation PMPanelBackgroundView

- (void)drawRect:(NSRect)rect
{
	[[NSColor colorWithCalibratedWhite:0.9337 alpha:0.98] set];
	NSRectFill(rect);
}

@end

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSWindow - Sheets - background alpha value
      • From: Keith Wilson <email@hidden>
    • Re: NSWindow - Sheets - background alpha value
      • From: Ricky Sharp <email@hidden>
References: 
 >NSWindow - Sheets - background alpha value (From: Keith Wilson <email@hidden>)

  • Prev by Date: Re: Preference pane deployment
  • Next by Date: Re: NSWindow - Sheets - background alpha value
  • Previous by thread: Re: NSWindow - Sheets - background alpha value
  • Next by thread: Re: NSWindow - Sheets - background alpha value
  • Index(es):
    • Date
    • Thread