Re: Graphics seen when volume is modified.
Re: Graphics seen when volume is modified.
- Subject: Re: Graphics seen when volume is modified.
- From: Jean-Daniel Dupas <email@hidden>
- Date: Sat, 3 May 2008 11:01:12 +0200
And after that, you can either uses NSImage but it's not really nice,
or create a NSView subclass to do your drawing.
I had to do this myself and want to share some knowledge.
Actually, the notification windows is 161 points wide, and 156 points
high (with 1 point = 1 pixel when use scale factor = 1) without shadow.
This is a rounded rect with a radius of 25 pixels, filled using a
black color with alpha set to 0.15.
And the window frame origin is center for x, and 140 points for y.
[[NSColor colorWithCalibratedWhite:0 alpha:0.15] setFill];
[[NSBezierPath bezierPathWithRoundedRect:NSMakeRect(0, 0, 161, 156)
xRadius:25 yRadius:25] fill];
Le 3 mai 08 à 04:19, Jamie Phelps a écrit :
You might also check out the RoundedFloatingPanel code from Matt
Gemmell: http://mattgemmell.com/source about 60% of the way down.
JP
On May 2, 2008, at 3:38 AM, John Clayton wrote:
Hi All,
Does anyone know of some code that mimics the graphics that are
displayed by Apple when one modifies the system volume?
Specifically the grey box + white shadowed text that pops up
briefly. I want to do something similar in my app, so any kind of
guiding code would be useful.
Any info about the box or code that emulates this would be useful,
Thanks!
--
John Clayton
http://www.coderage-software.com/
_______________________________________________
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
_______________________________________________
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
_______________________________________________
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