git.ithinksw.org
/
ITKit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Some more code cleanup, converting spaces to tabs. Redid ITKit.h framework
[ITKit.git]
/
ITPivotWindowEffect.m
diff --git
a/ITPivotWindowEffect.m
b/ITPivotWindowEffect.m
old mode 100755
(executable)
new mode 100644
(file)
index
373c5f3
..
3b0c5a4
--- a/
ITPivotWindowEffect.m
+++ b/
ITPivotWindowEffect.m
@@
-203,14
+203,15
@@
{
int hPos = [_window horizontalPosition];
int vPos = [_window verticalPosition];
{
int hPos = [_window horizontalPosition];
int vPos = [_window verticalPosition];
+ NSRect winFrame = [_window frame];
if ( (hPos == ITWindowPositionCenter) || (vPos == ITWindowPositionMiddle) ) {
CGAffineTransform transform;
NSPoint translation;
if ( (hPos == ITWindowPositionCenter) || (vPos == ITWindowPositionMiddle) ) {
CGAffineTransform transform;
NSPoint translation;
- translation.x =
( -([_window frame].origin.x) )
;
- translation.y =
-( [[_window screen] frame].size.height - [_window frame].origin.y - [_window frame].size.height )
;
+ translation.x =
-winFrame.origin.x
;
+ translation.y =
winFrame.origin.y + winFrame.size.height - [[NSScreen mainScreen] frame].size.height
;
transform = CGAffineTransformMakeTranslation( translation.x, translation.y );
transform = CGAffineTransformMakeTranslation( translation.x, translation.y );
@@
-220,10
+221,9
@@
} else {
float degAngle;
} else {
float degAngle;
- NSRect windowFrame = [_window frame];
NSRect screenFrame = [[_window screen] frame];
NSRect screenFrame = [[_window screen] frame];
- float translateX;
- float translateY;
+ float translateX
= 0
;
+ float translateY
= 0
;
CGAffineTransform transform;
if ( vPos == ITWindowPositionBottom ) {
CGAffineTransform transform;
if ( vPos == ITWindowPositionBottom ) {
@@
-242,23
+242,22
@@
degAngle = (angle * (pi / 180));
transform = CGAffineTransformMakeRotation(degAngle);
degAngle = (angle * (pi / 180));
transform = CGAffineTransformMakeRotation(degAngle);
-
if ( vPos == ITWindowPositionBottom ) {
if ( vPos == ITWindowPositionBottom ) {
- transform.ty = ( win
dowFrame.size.height + windowFrame.origin.y
);
+ transform.ty = ( win
Frame.size.height + winFrame.origin.y) + (screenFrame.size.height - [[NSScreen mainScreen] frame].size.height
);
translateY = -(screenFrame.size.height);
} else if ( vPos == ITWindowPositionTop ) {
translateY = -(screenFrame.size.height);
} else if ( vPos == ITWindowPositionTop ) {
-
transform.ty = -( screenFrame.size.height - windowFrame.origin.y - windowFrame.size.height )
;
+
transform.ty = winFrame.origin.y + winFrame.size.height - [[NSScreen mainScreen] frame].size.height
;
translateY = 0;
}
if ( hPos == ITWindowPositionLeft ) {
translateY = 0;
}
if ( hPos == ITWindowPositionLeft ) {
- transform.tx = -( win
dow
Frame.origin.x );
+ transform.tx = -( winFrame.origin.x );
translateX = 0;
} else if ( hPos == ITWindowPositionRight ) {
translateX = 0;
} else if ( hPos == ITWindowPositionRight ) {
- transform.tx = ( screenFrame.size.width - windowFrame.origin.x );
+ //transform.tx = ( screenFrame.size.width - winFrame.origin.x );
+ transform.tx = ( screenFrame.size.width - winFrame.origin.x );
translateX = -(screenFrame.size.width);
}
translateX = -(screenFrame.size.width);
}
-
CGSSetWindowTransform([NSApp contextID],
(CGSWindowID)[_window windowNumber],
CGAffineTransformTranslate( transform,
CGSSetWindowTransform([NSApp contextID],
(CGSWindowID)[_window windowNumber],
CGAffineTransformTranslate( transform,