Changeset View
Changeset View
Standalone View
Standalone View
effects/minimizeanimation/minimizeanimation.cpp
Show First 20 Lines • Show All 85 Lines • ▼ Show 20 Line(s) | 82 | if (animationIt != m_animations.constEnd()) { | |||
---|---|---|---|---|---|
86 | QRect geo = w->geometry(); | 86 | QRect geo = w->geometry(); | ||
87 | QRect icon = w->iconGeometry(); | 87 | QRect icon = w->iconGeometry(); | ||
88 | // If there's no icon geometry, minimize to the center of the screen | 88 | // If there's no icon geometry, minimize to the center of the screen | ||
89 | if (!icon.isValid()) | 89 | if (!icon.isValid()) | ||
90 | icon = QRect(effects->virtualScreenGeometry().center(), QSize(0, 0)); | 90 | icon = QRect(effects->virtualScreenGeometry().center(), QSize(0, 0)); | ||
91 | 91 | | |||
92 | data *= QVector2D(interpolate(1.0, icon.width() / (double)geo.width(), progress), | 92 | data *= QVector2D(interpolate(1.0, icon.width() / (double)geo.width(), progress), | ||
93 | interpolate(1.0, icon.height() / (double)geo.height(), progress)); | 93 | interpolate(1.0, icon.height() / (double)geo.height(), progress)); | ||
94 | data.setXTranslation((int)interpolate(data.xTranslation(), icon.x() - geo.x(), progress)); | 94 | data.setXTranslation(interpolate(data.xTranslation(), icon.x() - geo.x(), progress)); | ||
95 | data.setYTranslation((int)interpolate(data.yTranslation(), icon.y() - geo.y(), progress)); | 95 | data.setYTranslation(interpolate(data.yTranslation(), icon.y() - geo.y(), progress)); | ||
96 | data.multiplyOpacity(0.1 + (1 - progress) * 0.9); | 96 | data.multiplyOpacity(0.1 + (1 - progress) * 0.9); | ||
97 | } | 97 | } | ||
98 | 98 | | |||
99 | // Call the next effect. | 99 | // Call the next effect. | ||
100 | effects->paintWindow(w, mask, region, data); | 100 | effects->paintWindow(w, mask, region, data); | ||
101 | } | 101 | } | ||
102 | 102 | | |||
103 | void MinimizeAnimationEffect::postPaintScreen() | 103 | void MinimizeAnimationEffect::postPaintScreen() | ||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |