Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33d3c266 authored by Fabian Kozynski's avatar Fabian Kozynski
Browse files

Fix key frames in headers animation

When setting values for `sizePercent` (or `percentX/Y`) in a KeyPosition,
the value is the relative growth from 0 (beginning of animation) to 1
(end of animation).

Therefore, in order to not have apparent size change
(and movement) before and after the fade in the expansion, we need to
set it to 0 for the `KeyPosition` before 0.5 and 1 for the one after.

Test: manual, date and icons don't move horizontally on expansion
Fixes: 243260726
Change-Id: I30fcb6f4f0a8f9cae98aba22c0400f9c5a8513f1
parent cbe2a51d
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -29,17 +29,15 @@
                app:percentX="0"
                app:percentY="0"
                app:framePosition="49"
                app:percentWidth="1"
                app:percentHeight="1"
                app:sizePercent="0"
                app:curveFit="linear"
                app:motionTarget="@id/date" />
            <KeyPosition
                app:keyPositionType="deltaRelative"
                app:percentX="1"
                app:percentY="0.51"
                app:sizePercent="1"
                app:framePosition="51"
                app:percentWidth="1"
                app:percentHeight="1"
                app:curveFit="linear"
                app:motionTarget="@id/date" />
            <KeyAttribute
@@ -64,6 +62,7 @@
                app:percentX="0"
                app:percentY="0"
                app:framePosition="50"
                app:sizePercent="0"
                app:curveFit="linear"
                app:motionTarget="@id/statusIcons" />
            <KeyPosition
@@ -71,6 +70,7 @@
                app:percentX="1"
                app:percentY="0.51"
                app:framePosition="51"
                app:sizePercent="1"
                app:curveFit="linear"
                app:motionTarget="@id/statusIcons" />
            <KeyAttribute