Skip to content

Commit

Permalink
[*] update normally
Browse files Browse the repository at this point in the history
  • Loading branch information
heng30 committed Sep 8, 2024
1 parent 03b2885 commit 08a9791
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
6 changes: 2 additions & 4 deletions ui/base/record-indicator.slint
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ export component RecordIndicator inherits Rectangle {

if is-start: Rectangle {
private property <float> progress: Util.progress-value(root.duration);
width: Math.clamp(progress < 0.5 ? root.size * (0.5 + progress) : root.size * (1 - progress + 0.5), root.size * 0.5, root.size *0.9);

width: progress < 0.5 ? root.size * progress * 2 : root.size * (1 - progress) * 2;
height: self.width;
border-radius: self.width / 2;
background: root.living-color;
drop-shadow-color: root.living-color.brighter(20%);
drop-shadow-blur: Math.round(self.width / 1px * 0.5) * 1px;
background: @radial-gradient(circle, root.living-color 0%, root.living-color.brighter(100%) 40%, root.background 80%);
}
}
2 changes: 1 addition & 1 deletion ui/panel/desktop/examples/record-indicator.slint
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export component RecordIndicatorExample inherits Flickable {

RecordIndicator {
is-start: true;
size: Theme.icon-size * 2;
size: Theme.icon-size * 1.33;
duration: 3s;
living-color: Colors.red;
}
Expand Down
1 change: 1 addition & 0 deletions ui/store.slint
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export global Store {

//////////////////////////////// Logic Start ////////////////////////////////
in-out property <string> current-sidebar-key: "Introduction";
// in-out property <string> current-sidebar-key: "RecordIndicator";
in-out property <[SideBarEntry]> sidebar-entries: [
{
category: is-cn ? "介绍" : "Introduction",
Expand Down

0 comments on commit 08a9791

Please sign in to comment.