Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

CPWindow/NSWindow ContentRect vs. Frame

#65

There is some confusion when creating a CPWindow as to whether the initWithContentRect function specifies the size of the window's frame (including chrome) or the contentView's frame (excluding window chrome). While the naming suggests that the size given to initWithContentRect should correspond to the size of the frame of the contentView, this is not the case, and it corresponds to the size of the window's frame. This should also be tested in Cocoa to see if the functionality is the same. If it is, while it doesn't entirely make sense, it should be kept the same in order to comply with NSWindow. However, it does make more sense for [CPWindow initWithContentRect:] to correspond to the size of the frame of the actual contentView and have the chrome be built around this. Also possible to implement a [CPWindow initWithFrame:]

Reported by nciagra · September 22nd, 2008 @ 10:17 AM

State: resolved
Milestone: 0.6.5
Assigned to: Francisco Tolmasky Francisco Tolmasky

Activity

  1. Francisco Tolmasky
    Francisco Tolmasky

    If the window's contentview is not getting the contentRect, then this is a bug. The reason we can't supply an initWithFrame: for CPWindow is that the chrome may change in the future and all of a sudden your contentview's frame will be ruined.

    November 18th, 2008 @ 03:40 PM

  2. Francisco Tolmasky
    Francisco Tolmasky

    Yeah, looking inside of CPWindow.j, this seems to just be a bug.

    November 18th, 2008 @ 03:41 PM

  3. Francisco Tolmasky
    Francisco Tolmasky
    • Milestone set to 0.6.5
    • Assigned user set to Francisco Tolmasky

    December 22nd, 2008 @ 11:02 AM

  4. admin (at 280north)
    admin (at 280north)
    • State changed from new to resolved

    (from [459316f102f6cfd92a2379f7347d32e6f6de8c88]) Major Window Fixes/Changes.

    [#65 CPWindow/NSWindow ContentRect vs. Frame state:resolved]. [#58 HUDWindows and Toolbars state:resolved]. [#94 Make BorderlessBridge windows "anti-floating-panel" state:resolved].

    Reviewed by me. http://github.com/280north/cappu...

    December 22nd, 2008 @ 11:54 AM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.