Skip navigation.
 
mlRe: Graphics seen when volume is modified.
FROM : Jean-Daniel Dupas
DATE : Sat May 03 11:01:12 2008

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_removed>)
>>
>> 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:
>> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>>
>> This email sent to <email_removed>

>
> _______________________________________________
>
> Cocoa-dev mailing list (<email_removed>)
>
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>
>

Related mailsAuthorDate
mlGraphics seen when volume is modified. John Clayton May 2, 10:38
mlRe: Graphics seen when volume is modified. I. Savant May 2, 13:00
mlRe: Graphics seen when volume is modified. Christopher Nebel May 2, 20:41
mlRe: Graphics seen when volume is modified. Kyle Sluder May 2, 22:09
mlRe: Graphics seen when volume is modified. Shawn Erickson May 2, 22:51
mlRe: Graphics seen when volume is modified. Kyle Sluder May 2, 23:00
mlRe: Graphics seen when volume is modified. Jean-Daniel Dupas May 3, 00:52
mlRe: Graphics seen when volume is modified. Jamie Phelps May 3, 04:19
mlRe: Graphics seen when volume is modified. Jean-Daniel Dupas May 3, 11:01