Re: NSOpenPanel accessoryView clicks must hit pixels to work
Re: NSOpenPanel accessoryView clicks must hit pixels to work
- Subject: Re: NSOpenPanel accessoryView clicks must hit pixels to work
- From: Mike Abdullah <email@hidden>
- Date: Mon, 30 Mar 2015 17:37:46 +0100
> On 30 Mar 2015, at 17:34, Steve Mills <email@hidden> wrote:
>
> On Mar 30, 2015, at 11:14:17, Uli Kusterer <email@hidden> wrote:
>>
>> Makes sense considering that sandboxed apps don't run their own open panel. Instead the accessory view appears to be hosted in a borderless window that gets attached (at the Window Server level, I'd presume) to the actual open panel that runs in the PowerBox process. So it'd probably just let through any clicks in transparent areas to PowerBox in the underlying window.
>
> Jeez, what a horrible hack. But then, it is sandboxing we're talking about, which is by design an ugly hack. :)
>
>> A workaround would probably be to use a plain NSBox as your accessory view and fill it with a solid color (e.g. an opaque version of the color that a standard-appearance NSBox uses to fill itself). of course that'd run the risk of looking a bit ugly if Apple changes the color used for that. I don't see an obvious color for NSBox contents in NSColor.h.
>
> That seems to work, but I'm not going to fix Apple's ugly hack by adding an uglier hack.
Slightly less ugly idea, how about filling the background of your accessory view with something like 1% alpha? Would that be enough to direct clicks to the right place, without being visible to the human eye?
_______________________________________________
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