CPWindow/NSWindow ContentRect vs. Frame
Reported by nciagra | September 22nd, 2008 @ 10:17 AM | in 0.6.5
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:]
Comments and changes to this ticket
-
Francisco Tolmasky November 18th, 2008 @ 03:40 PM
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.
-
Francisco Tolmasky November 18th, 2008 @ 03:41 PM
Yeah, looking inside of CPWindow.j, this seems to just be a bug.
-
Francisco Tolmasky December 22nd, 2008 @ 11:02 AM
- Milestone set to 0.6.5
- Assigned user set to Francisco Tolmasky
-
admin (at 280north) December 22nd, 2008 @ 11:54 AM
- State changed from new to resolved
(from [459316f102f6cfd92a2379f7347d32e6f6de8c88]) Major Window Fixes/Changes.
[#65 state:resolved]. [#58 state:resolved]. [#94 state:resolved].
Reviewed by me. http://github.com/280north/cappu...
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.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
The Cappuccino Web Framework, including AppKit, Foundation, and Objective-J.
People watching this ticket
Tags
Referenced by
- 65 CPWindow/NSWindow ContentRect vs. Frame [#65 state:resolved]. [#58 state:resolved]. [#94 state:re...
- 58 HUDWindows and Toolbars [#65 state:resolved]. [#58 state:resolved]. [#94 state:re...
- 94 Make BorderlessBridge windows "anti-floating-panel" [#65 state:resolved]. [#58 state:resolved]. [#94 state:re...