pick bottomRight as current hook, cannot be < 0 (ie. no position transform in this direction)

icc-effect-5.14.5
Thomas Lübking 2011-11-29 22:56:56 +01:00
parent 4cda501ce2
commit e022efe2a2
1 changed files with 3 additions and 3 deletions

View File

@ -98,14 +98,14 @@ void AnimationEffect::animate( EffectWindow *w, Attribute a, uint meta, int ms,
} else if (a == Position) {
QRect area = effects->clientArea(ScreenArea , w);
QPoint pt = w->geometry().topLeft();
QPoint pt = w->geometry().bottomRight(); // cannot be < 0 ;-)
if (from.isValid()) {
RELATIVE_XY(Source);
from.set( relative[0] ? area.x() + from[0] * area.width() : from[0],
relative[1] ? area.y() + from[1] * area.height() : from[1] );
} else {
from.set(pt.x(), pt.y());
setMetaData( SourceAnchor, AnimationEffect::Top|AnimationEffect::Left, meta );
setMetaData( SourceAnchor, AnimationEffect::Bottom|AnimationEffect::Right, meta );
}
if (to.isValid()) {
@ -114,7 +114,7 @@ void AnimationEffect::animate( EffectWindow *w, Attribute a, uint meta, int ms,
relative[1] ? area.y() + to[1] * area.height() : to[1] );
} else {
to.set(pt.x(), pt.y());
setMetaData( TargetAnchor, AnimationEffect::Top|AnimationEffect::Left, meta );
setMetaData( TargetAnchor, AnimationEffect::Bottom|AnimationEffect::Right, meta );
}