Re: Centering a window on the *current* screen, not the *main* screen
Re: Centering a window on the *current* screen, not the *main* screen
- Subject: Re: Centering a window on the *current* screen, not the *main* screen
- From: Gregory Weston <email@hidden>
- Date: Tue, 26 Jan 2010 08:50:03 -0500
Oleg Krupnov wrote:
> Anyway, it's an annoyance that the [NSWindow center] uses [NSScreen
> mainScreen] instead of [NSWindow screen]. I'd consider it a bug of
> AppKit, indeed.
No, just a philosophical difference regarding the meaning and, more importantly, intent of "centering" a window. And it predates AppKit. The goal isn't really to physically center a window on the screen. It's to position it in a defined location that is a focus of user attention. Consider the docs:
"You typically use this method to place a window—most likely an alert dialog—where the user can’t miss it. This method is invoked automatically when a panel is placed on the screen by the runModalForWindow: method of the NSApplication class."
Why? Because:
"Such a placement carries a certain visual immediacy and importance."_______________________________________________
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