diff --git a/Cargo.toml b/Cargo.toml index 4c5b873..2ca3c2c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,11 +31,11 @@ rfd = { version = "0.11", default-features = false, features = [ "xdg-portal" ] serde = "1.0.136" serde_json = "1.0.78" shlex = "1.1" -slint = { version = "1", default-features = false, features = [ "compat-1-0" ] } +slint = { version = "1.1", default-features = false, features = [ "compat-1-0" ] } tokio = { version = "1.24.2", features= ["full"] } toml_edit = "0.19.0" git2 = "0.16.1" [build-dependencies] -slint-build = { version = "1" } +slint-build = { version = "1.1" } diff --git a/ui/install.slint b/ui/install.slint index 12953e0..60e7b3c 100644 --- a/ui/install.slint +++ b/ui/install.slint @@ -4,7 +4,7 @@ import { ComboBox, VerticalBox, HorizontalBox, GridBox, Button, - LineEdit, ListView, GroupBox, CheckBox + LineEdit, ListView, GroupBox, CheckBox, ProgressIndicator } from "std-widgets.slint"; import { CratesCompletionData } from "crates_completion.slint"; @@ -81,21 +81,9 @@ export component CargoInstallView inherits GridBox { horizontal-alignment: right; } } - if crate.queued : Rectangle { - height: crate_name.preferred_height; - Rectangle { - y:0; - width: parent.width / 2; - x: parent.width - self.width - 6px; - height: parent.height - 6px; - property col1 : #2320db; - property col2 : #4fa4dd; - - property animated : Math.mod(animation-tick()/2s, 1); - background: self.animated < 0.25 ? @linear-gradient(90deg, self.col1 0%, self.col1 self.animated*4, self.col2 100%) - : self.animated < 0.5 ? @linear-gradient(90deg, self.col2 0%, self.col1 self.animated*4 - 1, self.col1 100%) - : self.animated < 0.75 ? @linear-gradient(90deg, self.col2 0%, self.col2 self.animated*4 - 2, self.col1 100%) - : @linear-gradient(90deg, self.col1 0%, self.col2 self.animated*4 - 3, self.col2 100%); + if crate.queued : HorizontalBox { + ProgressIndicator { + indeterminate: true; } } }