Skip to content

Commit

Permalink
perf(ui): menu expand animation
Browse files Browse the repository at this point in the history
  • Loading branch information
Serein207 committed Aug 11, 2024
1 parent 007c8d9 commit 7f25fb1
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions ui/views/overlay/menu.slint
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,14 @@ export component MenuOverlay inherits Overlay {
width: 100%;
height: 100%;
placeholder := Rectangle {
background: Colors.rgba(0, 0, 0, 0.5);
border-width: 4px;
border-color: red;
Text {
text: "菜单\n (需要暗色背景,详见设计稿)";
background: transparent;
init => {
self.background = Colors.rgba(0,0,0,0.5)
}

animate background {
duration: 400ms;
easing: ease-in-out;
}
}

Expand Down

0 comments on commit 7f25fb1

Please sign in to comment.