X-Git-Url: http://git.ithinksw.org/ITKit.git/blobdiff_plain/55f9d57f56bbbbb2c589201246a29858c6cf4e56..650aa30b6ac73ecb0727ec4409f02bf90adf51f5:/ITSlideVerticallyWindowEffect.m?ds=inline diff --git a/ITSlideVerticallyWindowEffect.m b/ITSlideVerticallyWindowEffect.m old mode 100755 new mode 100644 index 7237620..1f60933 --- a/ITSlideVerticallyWindowEffect.m +++ b/ITSlideVerticallyWindowEffect.m @@ -187,15 +187,16 @@ { CGAffineTransform transform; NSPoint translation; + NSRect winFrame = [_window frame]; translation.x = -( [_window frame].origin.x ); if ( [_window verticalPosition] == ITWindowPositionTop ) { - translation.y = ( (([_window frame].size.height * 2) - ([[_window screen] frame].size.height - [_window frame].origin.y)) - distance); + translation.y = (winFrame.size.height * 2) - ([[NSScreen mainScreen] frame].size.height - winFrame.origin.y) - distance; } else if ( [_window verticalPosition] == ITWindowPositionBottom ) { - translation.y = -( [[_window screen] frame].size.height - [_window frame].origin.y - distance ); + translation.y = winFrame.origin.y + distance - [[NSScreen mainScreen] frame].size.height; } else { - translation.y = -( [[_window screen] frame].size.height - [_window frame].origin.y - [_window frame].size.height ); + translation.y = winFrame.origin.y + winFrame.size.height - [[NSScreen mainScreen] frame].size.height; } transform = CGAffineTransformMakeTranslation( translation.x, translation.y );