mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 04:10:47 +00:00
Window frame handling fixups (bug #17377)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23399 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a4ef3482cc
commit
56635aac0e
7 changed files with 246 additions and 257 deletions
|
@ -616,26 +616,6 @@ static NSNotificationCenter *nc = nil;
|
|||
styleMask: aStyle];
|
||||
}
|
||||
|
||||
+ (NSRect) screenRectForFrameRect: (NSRect)aRect
|
||||
styleMask: (unsigned int)aStyle
|
||||
{
|
||||
if (!windowDecorator)
|
||||
windowDecorator = [GSWindowDecorationView windowDecorator];
|
||||
|
||||
return [windowDecorator screenRectForFrameRect: aRect
|
||||
styleMask: aStyle];
|
||||
}
|
||||
|
||||
+ (NSRect) frameRectForScreenRect: (NSRect)aRect
|
||||
styleMask: (unsigned int)aStyle
|
||||
{
|
||||
if (!windowDecorator)
|
||||
windowDecorator = [GSWindowDecorationView windowDecorator];
|
||||
|
||||
return [windowDecorator frameRectForScreenRect: aRect
|
||||
styleMask: aStyle];
|
||||
}
|
||||
|
||||
+ (float) minFrameWidthWithTitle: (NSString *)aTitle
|
||||
styleMask: (unsigned int)aStyle
|
||||
{
|
||||
|
@ -1706,16 +1686,20 @@ many times.
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Moving and resizing the window
|
||||
*/
|
||||
- (NSPoint) cascadeTopLeftFromPoint: (NSPoint)topLeftPoint
|
||||
{
|
||||
// FIXME: As we know nothing about the other window we can only guess
|
||||
topLeftPoint.x += 20;
|
||||
topLeftPoint.y += 20;
|
||||
NSRect cRect;
|
||||
|
||||
if (NSEqualPoints(topLeftPoint, NSZeroPoint) == YES)
|
||||
{
|
||||
topLeftPoint.x = _frame.origin.x;
|
||||
topLeftPoint.y = _frame.origin.y + _frame.size.height;
|
||||
}
|
||||
[self setFrameTopLeftPoint: topLeftPoint];
|
||||
cRect = [isa contentRectForFrameRect: _frame styleMask: _styleMask];
|
||||
topLeftPoint.x = cRect.origin.x;
|
||||
topLeftPoint.y = cRect.origin.y + cRect.size.height;
|
||||
|
||||
return topLeftPoint;
|
||||
}
|
||||
|
||||
|
@ -4061,7 +4045,7 @@ resetCursorRectsForView(NSView *theView)
|
|||
[_wv convertRect: rect fromView: nil]];
|
||||
}
|
||||
|
||||
- (NSData *)dataWithPDFInsideRect:(NSRect)aRect
|
||||
- (NSData *) dataWithPDFInsideRect:(NSRect)aRect
|
||||
{
|
||||
return [_wv dataWithPDFInsideRect:
|
||||
[_wv convertRect: aRect fromView: nil]];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue