X-Git-Url: http://git.ithinksw.org/ITKit.git/blobdiff_plain/4f3da8543caacbaf1ce219e547e24a5490bee090..7a218424c6a92eb4979564a7260f862edd46052d:/ITSlideVerticallyWindowEffect.m diff --git a/ITSlideVerticallyWindowEffect.m b/ITSlideVerticallyWindowEffect.m old mode 100755 new mode 100644 index a8825ab..1f60933 --- a/ITSlideVerticallyWindowEffect.m +++ b/ITSlideVerticallyWindowEffect.m @@ -187,13 +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 = winFrame.origin.y + winFrame.size.height - [[NSScreen mainScreen] frame].size.height; } transform = CGAffineTransformMakeTranslation( translation.x, translation.y );