[systemui]添加滑动删除按钮开盖动画效果

Signed-off-by: lizhi <lizhi140@huawei.com>
This commit is contained in:
lizhi
2022-09-01 14:35:37 +08:00
parent 41c28b5453
commit ee574ce962
3 changed files with 44 additions and 13 deletions
@@ -126,19 +126,36 @@ export default struct SwipeLayout {
Row(){
Button({ type: ButtonType.Circle, stateEffect: true }) {
Image($r("app.media.ic_public_delete_filled"))
.objectFit(ImageFit.Contain)
.fillColor($r("sys.color.ohos_id_color_primary_contrary"))
.width(Layout.ICON_SIZE)
.height(Layout.ICON_SIZE)
.rotate({
x: 0,
y: 0,
z: 1,
centerX: '50%',
centerY: '50%',
angle: this.rotateAngel
})
Stack() {
Image($r("app.media.ic_public_delete_lids_filled"))
.objectFit(ImageFit.Contain)
.fillColor($r("sys.color.ohos_id_color_primary_contrary"))
.width(Layout.ICON_SIZE)
.height(Layout.ICON_SIZE)
.rotate({
x: 0,
y: 0,
z: 1,
centerX: '89.45%',
centerY: '17.71%',
angle: this.rotateAngel
})
Image($r("app.media.ic_public_delete_body_filled"))
.objectFit(ImageFit.Contain)
.fillColor($r("sys.color.ohos_id_color_primary_contrary"))
.width(Layout.ICON_SIZE)
.height(Layout.ICON_SIZE)
.rotate({
x: 0,
y: 0,
z: 1,
centerX: '82.94%',
centerY: '29.17%',
angle: -this.rotateAngel
})
}
.width(Layout.ICON_SIZE)
.height(Layout.ICON_SIZE)
}
.backgroundColor($r("app.color.button_background"))
.zIndex(1)
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>垃圾桶桶身</title>
<g id="垃圾桶桶身" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M19.905,7 L18.7182288,19.0681369 C18.5606486,20.6702027 17.2574873,21.9055183 15.668412,21.9948255 L15.4838372,22 L8.51616277,22 C6.90636576,22 5.54941872,20.8240202 5.30498855,19.2513187 L5.28177119,19.0681369 L4.095,7 L19.905,7 Z M10,11.75 C9.58578644,11.75 9.25,12.0857864 9.25,12.5 L9.25,12.5 L9.25,18.5 C9.25,18.9142136 9.58578644,19.25 10,19.25 C10.4142136,19.25 10.75,18.9142136 10.75,18.5 L10.75,18.5 L10.75,12.5 C10.75,12.0857864 10.4142136,11.75 10,11.75 Z M14,11.75 C13.5857864,11.75 13.25,12.0857864 13.25,12.5 L13.25,12.5 L13.25,18.5 C13.25,18.9142136 13.5857864,19.25 14,19.25 C14.4142136,19.25 14.75,18.9142136 14.75,18.5 L14.75,18.5 L14.75,12.5 C14.75,12.0857864 14.4142136,11.75 14,11.75 Z" id="形状结合" fill="#000000" fill-rule="nonzero"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>垃圾桶盖子</title>
<g id="垃圾桶盖子" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M12.2170799,0.75 C13.7897917,0.75 15.0798489,1.9601879 15.2068226,3.50013463 L21.4670799,3.5 C21.8812935,3.5 22.2170799,3.83578644 22.2170799,4.25 C22.2170799,4.64942022 21.9048499,4.97591522 21.5111481,4.99872683 L21.4670799,5 L2.96707991,5 C2.55286635,5 2.21707991,4.66421356 2.21707991,4.25 C2.21707991,3.85057978 2.5293099,3.52408478 2.92301171,3.50127317 L2.96707991,3.5 L9.22733725,3.50013463 C9.35431089,1.9601879 10.6443681,0.75 12.2170799,0.75 Z" id="形状结合" fill="#000000" fill-rule="nonzero"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 860 B