• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Centering a window on the *current* screen, not the *main* screen
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: BIG Thread problem (theorical).. need some advice.
  • Next by Date: Re: Change background color of UITabBarItem and UITabBar
  • Previous by thread: Re: BIG Thread problem (theorical).. need some advice.
  • Next by thread: Debugging auto_zone_resurrection_error in Core Data using GCD
  • Index(es):
    • Date
    • Thread