am 13a81aad: Merge "DO NOT MERGE Limit the height of the pull glow." into gingerbread
Merge commit '13a81aad3dcc2f0410ffe624e3666a15ee9c82dd' into gingerbread-plus-aosp * commit '13a81aad3dcc2f0410ffe624e3666a15ee9c82dd': DO NOT MERGE Limit the height of the pull glow.
This commit is contained in:
@@ -145,10 +145,9 @@ public class EdgeGlow {
|
|||||||
mEdgeScaleY = mEdgeScaleYStart = Math.max(
|
mEdgeScaleY = mEdgeScaleYStart = Math.max(
|
||||||
HELD_EDGE_SCALE_Y, Math.min(distance * PULL_DISTANCE_EDGE_FACTOR, 1.f));
|
HELD_EDGE_SCALE_Y, Math.min(distance * PULL_DISTANCE_EDGE_FACTOR, 1.f));
|
||||||
|
|
||||||
mGlowAlpha = mGlowAlphaStart = Math.min(
|
mGlowAlpha = mGlowAlphaStart = Math.min(MAX_ALPHA,
|
||||||
mGlowAlpha +
|
mGlowAlpha +
|
||||||
(Math.abs(deltaDistance) * PULL_DISTANCE_ALPHA_GLOW_FACTOR),
|
(Math.abs(deltaDistance) * PULL_DISTANCE_ALPHA_GLOW_FACTOR));
|
||||||
MAX_ALPHA);
|
|
||||||
|
|
||||||
float glowChange = Math.abs(deltaDistance);
|
float glowChange = Math.abs(deltaDistance);
|
||||||
if (deltaDistance > 0 && mPullDistance < 0) {
|
if (deltaDistance > 0 && mPullDistance < 0) {
|
||||||
@@ -157,8 +156,10 @@ public class EdgeGlow {
|
|||||||
if (mPullDistance == 0) {
|
if (mPullDistance == 0) {
|
||||||
mGlowScaleY = 0;
|
mGlowScaleY = 0;
|
||||||
}
|
}
|
||||||
mGlowScaleY = mGlowScaleYStart = Math.max(
|
|
||||||
0, mGlowScaleY + glowChange * PULL_DISTANCE_GLOW_FACTOR);
|
// Do not allow glow to get larger than MAX_GLOW_HEIGHT.
|
||||||
|
mGlowScaleY = mGlowScaleYStart = Math.min(MAX_GLOW_HEIGHT, Math.max(
|
||||||
|
0, mGlowScaleY + glowChange * PULL_DISTANCE_GLOW_FACTOR));
|
||||||
|
|
||||||
mEdgeAlphaFinish = mEdgeAlpha;
|
mEdgeAlphaFinish = mEdgeAlpha;
|
||||||
mEdgeScaleYFinish = mEdgeScaleY;
|
mEdgeScaleYFinish = mEdgeScaleY;
|
||||||
|
|||||||
Reference in New Issue
Block a user