X-Git-Url: http://git.ithinksw.org/ITKit.git/blobdiff_plain/f7665c2fca31bcea0750b3de74e0aedba934b153..3055b035aa851467097d35d886890f272dc90ee7:/ITSpinAndZoomWindowEffect.m diff --git a/ITSpinAndZoomWindowEffect.m b/ITSpinAndZoomWindowEffect.m index 8369fc2..cbbf44c 100755 --- a/ITSpinAndZoomWindowEffect.m +++ b/ITSpinAndZoomWindowEffect.m @@ -193,28 +193,28 @@ - (void)setScale:(float)scale angle:(float)angle { - int hPos = [_window horizontalPosition]; + //int hPos = [_window horizontalPosition]; float radAngle = (angle * 4 * pi); CGAffineTransform transform; NSPoint translation; NSRect screenFrame = [[_window screen] frame]; - translation.x = screenFrame.origin.x + ([_window frame].size.width / 2.0); - translation.y = screenFrame.origin.y + ([_window frame].size.height / 2.0); + translation.x = /*screenFrame.origin.x + */([_window frame].size.width / 2.0); + translation.y = /*screenFrame.origin.y + */([_window frame].size.height / 2.0); transform = CGAffineTransformMakeTranslation(translation.x, translation.y); transform = CGAffineTransformScale(transform, 1.0 / scale, 1.0 / scale); transform = CGAffineTransformRotate(transform, radAngle); transform = CGAffineTransformTranslate(transform, -translation.x, -translation.y); - if (hPos == ITWindowPositionLeft) { + /*if (hPos == ITWindowPositionLeft) { translation.x = -[_window frame].origin.x; } else if (hPos == ITWindowPositionRight) { translation.x = -[_window frame].origin.x; } else { translation.x = -[_window frame].origin.x; - } - - translation.y = -( [[_window screen] frame].size.height - [_window frame].origin.y - [_window frame].size.height ); + }*/ + translation.x = -[_window frame].origin.x; + translation.y = -( screenFrame.size.height - [_window frame].origin.y - [_window frame].size.height ); transform = CGAffineTransformTranslate(transform, translation.x, translation.y); CGSSetWindowTransform([NSApp contextID],