diff options
author | 2023-02-28 20:47:13 +0100 | |
---|---|---|
committer | 2023-02-28 20:47:13 +0100 | |
commit | 3f6e28fa9b1b8d911f765c9efb5249a9e0c942d5 (patch) | |
tree | 5dc0bd03ae19c9285c36017519a3b048f561620e | |
parent | fd06de5d9c5afa05c5b11cda730b0769aef92caa (diff) | |
download | iced-3f6e28fa9b1b8d911f765c9efb5249a9e0c942d5.tar.gz iced-3f6e28fa9b1b8d911f765c9efb5249a9e0c942d5.tar.bz2 iced-3f6e28fa9b1b8d911f765c9efb5249a9e0c942d5.zip |
Use `iced_renderer` instead of `iced_graphics` in root crate
-rw-r--r-- | Cargo.toml | 5 | ||||
-rw-r--r-- | renderer/Cargo.toml | 2 | ||||
-rw-r--r-- | renderer/src/lib.rs | 1 | ||||
-rw-r--r-- | renderer/src/widget.rs | 5 | ||||
-rw-r--r-- | src/error.rs | 2 | ||||
-rw-r--r-- | src/widget.rs | 4 |
6 files changed, 13 insertions, 6 deletions
@@ -17,9 +17,9 @@ image = ["iced_renderer/image", "image_rs"] # Enables the `Svg` widget svg = ["iced_renderer/svg"] # Enables the `Canvas` widget -canvas = ["iced_graphics/canvas"] +canvas = ["iced_renderer/canvas"] # Enables the `QRCode` widget -qr_code = ["iced_graphics/qr_code"] +qr_code = ["iced_renderer/qr_code"] # Enables a debug view in native platforms (press F12) debug = ["iced_winit/debug"] # Enables `tokio` as the `executor::Default` on native platforms @@ -60,7 +60,6 @@ members = [ iced_core = { version = "0.8", path = "core" } iced_futures = { version = "0.6", path = "futures" } iced_native = { version = "0.9", path = "native" } -iced_graphics = { version = "0.7", path = "graphics" } iced_renderer = { version = "0.1", path = "renderer" } iced_winit = { version = "0.8", path = "winit", features = ["application"] } thiserror = "1.0" diff --git a/renderer/Cargo.toml b/renderer/Cargo.toml index 5ba5d426..1f21f06b 100644 --- a/renderer/Cargo.toml +++ b/renderer/Cargo.toml @@ -6,6 +6,8 @@ edition = "2021" [features] image = ["iced_wgpu/image", "iced_tiny_skia/image"] svg = ["iced_wgpu/svg", "iced_tiny_skia/svg"] +canvas = ["iced_graphics/canvas"] +qr_code = ["iced_graphics/qr_code"] tracing = ["iced_wgpu/tracing"] [dependencies] diff --git a/renderer/src/lib.rs b/renderer/src/lib.rs index d0ba6793..f9bfc373 100644 --- a/renderer/src/lib.rs +++ b/renderer/src/lib.rs @@ -1,3 +1,4 @@ +pub mod widget; pub mod window; mod backend; diff --git a/renderer/src/widget.rs b/renderer/src/widget.rs new file mode 100644 index 00000000..417cc06f --- /dev/null +++ b/renderer/src/widget.rs @@ -0,0 +1,5 @@ +#[cfg(feature = "qr_code")] +pub use iced_graphics::widget::qr_code; + +#[cfg(feature = "canvas")] +pub use iced_graphics::widget::canvas; diff --git a/src/error.rs b/src/error.rs index 0bfa3ff1..5326718f 100644 --- a/src/error.rs +++ b/src/error.rs @@ -13,7 +13,7 @@ pub enum Error { /// The application graphics context could not be created. #[error("the application graphics context could not be created")] - GraphicsCreationFailed(iced_graphics::Error), + GraphicsCreationFailed(iced_renderer::Error), } impl From<iced_winit::Error> for Error { diff --git a/src/widget.rs b/src/widget.rs index e2b0537e..04cb0e50 100644 --- a/src/widget.rs +++ b/src/widget.rs @@ -165,7 +165,7 @@ pub use vertical_slider::VerticalSlider; #[cfg(feature = "canvas")] #[cfg_attr(docsrs, doc(cfg(feature = "canvas")))] -pub use iced_graphics::widget::canvas; +pub use iced_renderer::widget::canvas; #[cfg(feature = "canvas")] #[cfg_attr(docsrs, doc(cfg(feature = "canvas")))] @@ -192,7 +192,7 @@ pub mod image { #[cfg(feature = "qr_code")] #[cfg_attr(docsrs, doc(cfg(feature = "qr_code")))] -pub use iced_graphics::widget::qr_code; +pub use iced_renderer::widget::qr_code; #[cfg(feature = "svg")] #[cfg_attr(docsrs, doc(cfg(feature = "svg")))] |