mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 20:47:38 +00:00
Make _frame in -gui the window frame always. Add methods for converting to/from screen frames.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19855 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d52db5f427
commit
8a4361bbae
7 changed files with 124 additions and 19 deletions
|
@ -609,6 +609,26 @@ 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
|
||||
{
|
||||
|
@ -773,13 +793,12 @@ many times.
|
|||
_gstate = GSDefineGState(context);
|
||||
DPSgrestore(context);
|
||||
|
||||
if (NSIsEmptyRect([_wv frame]))
|
||||
{
|
||||
NSRect frame = _frame;
|
||||
frame.origin = NSZeroPoint;
|
||||
[_wv setFrame: frame];
|
||||
}
|
||||
[_wv setNeedsDisplay: YES];
|
||||
{
|
||||
NSRect frame = _frame;
|
||||
frame.origin = NSZeroPoint;
|
||||
[_wv setFrame: frame];
|
||||
[_wv setNeedsDisplay: YES];
|
||||
}
|
||||
|
||||
/* Ok, now add the drag types back */
|
||||
if (dragTypes)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue