From ed3454301e663a7cb7d73cd56b57b188f4d14a2f Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 30 Aug 2023 04:31:21 +0200 Subject: Implement explicit text caching in the widget state tree --- examples/custom_widget/src/main.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'examples/custom_widget') diff --git a/examples/custom_widget/src/main.rs b/examples/custom_widget/src/main.rs index 713bc62d..e0a23541 100644 --- a/examples/custom_widget/src/main.rs +++ b/examples/custom_widget/src/main.rs @@ -43,6 +43,7 @@ mod circle { fn layout( &self, + _tree: &widget::Tree, _renderer: &Renderer, _limits: &layout::Limits, ) -> layout::Node { -- cgit From a026e917d3364e58fd827995261158d8cb356ce9 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 30 Aug 2023 06:36:24 +0200 Subject: Make `widget::Tree` mutable in `Widget::layout` --- examples/custom_widget/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/custom_widget') diff --git a/examples/custom_widget/src/main.rs b/examples/custom_widget/src/main.rs index e0a23541..32a14cbe 100644 --- a/examples/custom_widget/src/main.rs +++ b/examples/custom_widget/src/main.rs @@ -43,7 +43,7 @@ mod circle { fn layout( &self, - _tree: &widget::Tree, + _tree: &mut widget::Tree, _renderer: &Renderer, _limits: &layout::Limits, ) -> layout::Node { -- cgit From f468e25d0c67a01ee79d892f6e8ba9be019f06c7 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 4 Sep 2023 12:58:41 +0200 Subject: Use workspace dependencies and package inheritance We are also taking this as a chance to synchronize the versions of all the crates! Because of this, we will skip the `0.11` version. --- examples/custom_widget/Cargo.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'examples/custom_widget') diff --git a/examples/custom_widget/Cargo.toml b/examples/custom_widget/Cargo.toml index dda0efe8..1e94bc52 100644 --- a/examples/custom_widget/Cargo.toml +++ b/examples/custom_widget/Cargo.toml @@ -6,4 +6,5 @@ edition = "2021" publish = false [dependencies] -iced = { path = "../..", features = ["advanced"] } +iced.workspace = true +iced.features = ["advanced"] -- cgit From 6fd2c1552735639d96d177550e98b314bd6f79a8 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 7 Sep 2023 05:05:43 +0200 Subject: Host GIFs and video examples in `iced.rs` RIP Gfycat --- examples/custom_widget/README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'examples/custom_widget') diff --git a/examples/custom_widget/README.md b/examples/custom_widget/README.md index 3d6cf902..b80e898f 100644 --- a/examples/custom_widget/README.md +++ b/examples/custom_widget/README.md @@ -5,9 +5,7 @@ A demonstration of how to build a custom widget that draws a circle. The __[`main`]__ file contains all the code of the example.
- - - +
You can run it with `cargo run`: -- cgit