On Thu, Feb 26, 2015 at 2:45 PM, Uli Kusterer <witness.of.teacht...@gmx.net>
 wrote:

> On 25 Feb 2015, at 15:47, Arjan van Leeuwen <arj...@opera.com> wrote:
> >> This method is useful in many situations. If your window has a toolbar,
> for
> >> example, you can specify a location for the sheet that is just below
> it. If
> >> you want the sheet associated with a certain control or view, you could
> >> position the sheet so that it appears to originate from the object
> (through
> >> animation) or is positioned next to it.
> >
> > Great, because that's exactly what I'm using it for :). However, when my
> > app is in full-screen mode, this function never gets called. Other
> related
> > delegate functions, like windowWillBeginSheet: and windowDidEndSheet: do
> > get called correctly on the delegate, so the delegate is obviously still
> > there and as far as I can see should be receiving a call to
> > window:willPositionSheet:usingRect:.
>
>  I wonder whether Apple's UI team know of this documentation. Positioning
> a sheet next to any other UI element seems totally wrong for everything
> we've seen in Mac UI so far. Especially given 10.7 introduced pop-overs,
> which are designed exactly for that purpose and are not modal (or rather,
> cancel their mode when you click outside them, at least by default).
>
>  Are you sure it is a good idea to use a sheet for something like that? It
> sounds more like a job for a popover, which also handles much more of the
> required behaviour automatically.
>

I'm pretty sure a popover is not the way here, although a windowed dialog
could be possible :). This is a browser, and we're talking about the dialog
for saving a web page. That dialog is supposed to be either a sheet or a
windowed dialog, and since it's attached in this case to a specific tab of
the browser, we think it should be a sheet. And since it's related to a
specific tab, we expect it the sheet to appear attached to that tab (or
'originating from it' to use the language of the documentation), not
outside of it.

It seems that only Safari has figured out the secret to making the sheet
appear in the right place in full-screen mode as well as in windowed mode,
in other applications I see behavior similar to what happens in our
application (the sheet is well-positioned in windowed mode but hangs around
at its standard location in full-screen mode).


>
> > Does anyone know what I can do to make the framework call
> > window:willPositionSheet:usingRect:, even in full-screen mode? Or if not,
> > what other way should I use to position the sheet that will work in all
> > situations?
>
>  Fullscreen has a lot of assumptions about your window. We have a custom
> window title bar, yet when we're in fullscreen, the OS draws a fake
> "standard" title bar and toolbar for us floating above the window when you
> show the menu bar. Given you can't even inhibit that, I'm not surprised
> that they would also show sheets in the standard location relative to these
> fake window decorations.
>

Yes, I'm aware of that, and it makes some sense. Still would be nice to
know if I could customize it somehow though.

Thanks for your replies,

Arjan
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to