X-Git-Url: http://git.ithinksw.org/ITKit.git/blobdiff_plain/55f9d57f56bbbbb2c589201246a29858c6cf4e56..490cbda59abb52af3c07957ebc50f337799d6bf3:/ITSlideHorizontallyWindowEffect.m?ds=sidebyside diff --git a/ITSlideHorizontallyWindowEffect.m b/ITSlideHorizontallyWindowEffect.m old mode 100755 new mode 100644 index 1a26d1f..60122fd --- a/ITSlideHorizontallyWindowEffect.m +++ b/ITSlideHorizontallyWindowEffect.m @@ -187,16 +187,17 @@ { CGAffineTransform transform; NSPoint translation; - + NSRect winFrame = [_window frame]; + if ( [_window horizontalPosition] == ITWindowPositionLeft ) { - translation.x = ( -([_window frame].origin.x) + distance ) ; + translation.x = ( -(winFrame.origin.x) + distance ) ; } else if ( [_window horizontalPosition] == ITWindowPositionRight ) { - translation.x = ( -([_window frame].origin.x) - distance ) ; + translation.x = ( -(winFrame.origin.x) - distance ) ; } else { - translation.x = ( -([_window frame].origin.x) ) ; + translation.x = ( -(winFrame.origin.x) ) ; } - 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 );