summaryrefslogtreecommitdiffstats
path: root/examples/custom_widget
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-03-04 05:37:11 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-03-04 05:37:11 +0100
commit3a0d34c0240f4421737a6a08761f99d6f8140d02 (patch)
treec9a4a6b8e9c1db1b8fcd05bc98e3f131d5ef4bd5 /examples/custom_widget
parentc54409d1711e1f615c7ea4b02c082954e340632a (diff)
downloadiced-3a0d34c0240f4421737a6a08761f99d6f8140d02.tar.gz
iced-3a0d34c0240f4421737a6a08761f99d6f8140d02.tar.bz2
iced-3a0d34c0240f4421737a6a08761f99d6f8140d02.zip
Create `iced_widget` subcrate and re-organize the whole codebase
Diffstat (limited to 'examples/custom_widget')
-rw-r--r--examples/custom_widget/Cargo.toml3
-rw-r--r--examples/custom_widget/src/main.rs8
2 files changed, 5 insertions, 6 deletions
diff --git a/examples/custom_widget/Cargo.toml b/examples/custom_widget/Cargo.toml
index 067aab4a..dda0efe8 100644
--- a/examples/custom_widget/Cargo.toml
+++ b/examples/custom_widget/Cargo.toml
@@ -6,5 +6,4 @@ edition = "2021"
publish = false
[dependencies]
-iced = { path = "../.." }
-iced_native = { path = "../../native" }
+iced = { path = "../..", features = ["advanced"] }
diff --git a/examples/custom_widget/src/main.rs b/examples/custom_widget/src/main.rs
index f6bb3b1e..7854548c 100644
--- a/examples/custom_widget/src/main.rs
+++ b/examples/custom_widget/src/main.rs
@@ -9,10 +9,10 @@ mod circle {
// Of course, you can choose to make the implementation renderer-agnostic,
// if you wish to, by creating your own `Renderer` trait, which could be
// implemented by `iced_wgpu` and other renderers.
- use iced_native::layout::{self, Layout};
- use iced_native::renderer;
- use iced_native::widget::{self, Widget};
- use iced_native::{Color, Element, Length, Point, Rectangle, Size};
+ use iced::advanced::layout::{self, Layout};
+ use iced::advanced::renderer;
+ use iced::advanced::widget::{self, Widget};
+ use iced::{Color, Element, Length, Point, Rectangle, Size};
pub struct Circle {
radius: f32,