mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 21:17:03 +00:00
Fixed: window content view was not inset from the frame
Previously, _CPStandardWindowView did not inset the content view rect from the window frame, thus its contents could overlap the window frame. Now the content view is correctly inset so that content view content is clipped to the window frame, except for the corners. Because the corners are round and the window frame is a background color, they can still be overlapped. this will be fixed in a later commit. Closes #1798
This commit is contained in:
@@ -124,8 +124,17 @@ var _CPStandardWindowViewDividerViewHeight = 1.0;
|
||||
|
||||
+ (CGRect)contentRectForFrameRect:(CGRect)aFrameRect
|
||||
{
|
||||
/*
|
||||
This is the first window view class that draws a frame.
|
||||
So we have to inset the content rect to be inside the frame.
|
||||
The top coordinate has already been adjusted by _CPTitleableWindowView.
|
||||
*/
|
||||
var contentRect = [super contentRectForFrameRect:aFrameRect];
|
||||
|
||||
contentRect.origin.x += 1;
|
||||
contentRect.size.width -= 2;
|
||||
contentRect.size.height -= 1;
|
||||
|
||||
// Adjust for the divider
|
||||
contentRect.origin.y += _CPStandardWindowViewDividerViewHeight;
|
||||
contentRect.size.height -= _CPStandardWindowViewDividerViewHeight;
|
||||
|
||||
Reference in New Issue
Block a user