mirror of
https://github.com/ksherlock/TwoTerm.git
synced 2024-06-10 04:29:33 +00:00
animated resize
git-svn-id: svn://qnap.local/TwoTerm/trunk@1982 5590a31f-7b70-45f8-8c82-aa3a8e5f4507
This commit is contained in:
parent
1658fd2dd6
commit
c71eba9205
|
@ -91,7 +91,8 @@ private:
|
|||
-(void)dataAvailable;
|
||||
-(void)invalidateIRect: (iRect)rect;
|
||||
|
||||
-(void)resizeTo: (iSize)size;
|
||||
//-(void)resizeTo: (iSize)size;
|
||||
-(void)resizeTo: (iSize)size animated: (BOOL)animated;
|
||||
|
||||
-(void)cursorTimer: (NSTimer *)timer;
|
||||
|
||||
|
|
|
@ -463,7 +463,8 @@
|
|||
|
||||
}
|
||||
|
||||
-(void)resizeTo: (iSize)size
|
||||
|
||||
-(void)resizeTo: (iSize)size animated: (BOOL)animated
|
||||
{
|
||||
NSWindow *window = [self window];
|
||||
NSRect bounds = [self bounds];
|
||||
|
@ -477,7 +478,7 @@
|
|||
|
||||
// best case -- no change.
|
||||
if (NSEqualSizes(newSize, bounds.size)) return;
|
||||
|
||||
|
||||
|
||||
// ok, change needed.
|
||||
|
||||
|
@ -487,8 +488,13 @@
|
|||
wframe.size.width += newSize.width - bounds.size.width;
|
||||
|
||||
_inResizeTo = YES;
|
||||
[window setFrame: wframe display: YES animate: YES];
|
||||
_inResizeTo = NO;
|
||||
[window setFrame: wframe display: YES animate: animated];
|
||||
_inResizeTo = NO;
|
||||
}
|
||||
|
||||
-(void)resizeTo: (iSize)size
|
||||
{
|
||||
[self resizeTo: size animated: YES];
|
||||
}
|
||||
|
||||
|
||||
|
@ -697,7 +703,7 @@ void ViewScreen::setSize(unsigned width, unsigned height, bool resizeView)
|
|||
|
||||
if (resizeView)
|
||||
{
|
||||
[_view resizeTo: iSize(width, height)];
|
||||
[_view resizeTo: iSize(width, height) animated: YES];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user