summaryrefslogtreecommitdiffstats
path: root/src/widget.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-01-28 16:47:50 +0700
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-01-28 21:37:16 +0700
commit825c7749ff364cf1f7ae5cab0c25f27ed85c7d82 (patch)
treefdd7e499c343a7e3cf690d4b5aa40ba568674a3c /src/widget.rs
parent1e3feee3a36f25d7e2eda231c3e6b895858952c5 (diff)
downloadiced-825c7749ff364cf1f7ae5cab0c25f27ed85c7d82.tar.gz
iced-825c7749ff364cf1f7ae5cab0c25f27ed85c7d82.tar.bz2
iced-825c7749ff364cf1f7ae5cab0c25f27ed85c7d82.zip
Replace `iced_web` with WebGL support in `wgpu` :tada:
Diffstat (limited to 'src/widget.rs')
-rw-r--r--src/widget.rs96
1 files changed, 43 insertions, 53 deletions
diff --git a/src/widget.rs b/src/widget.rs
index 0f0b0325..c619bcfa 100644
--- a/src/widget.rs
+++ b/src/widget.rs
@@ -13,63 +13,53 @@
//!
//! These widgets have their own module with a `State` type. For instance, a
//! [`TextInput`] has some [`text_input::State`].
-#[cfg(not(target_arch = "wasm32"))]
-mod platform {
- pub use crate::renderer::widget::{
- button, checkbox, container, pane_grid, pick_list, progress_bar, radio,
- rule, scrollable, slider, text_input, toggler, tooltip, Column, Row,
- Space, Text,
- };
+pub use crate::renderer::widget::{
+ button, checkbox, container, pane_grid, pick_list, progress_bar, radio,
+ rule, scrollable, slider, text_input, toggler, tooltip, Column, Row, Space,
+ Text,
+};
- #[cfg(any(feature = "canvas", feature = "glow_canvas"))]
- #[cfg_attr(
- docsrs,
- doc(cfg(any(feature = "canvas", feature = "glow_canvas")))
- )]
- pub use crate::renderer::widget::canvas;
+#[cfg(any(feature = "canvas", feature = "glow_canvas"))]
+#[cfg_attr(
+ docsrs,
+ doc(cfg(any(feature = "canvas", feature = "glow_canvas")))
+)]
+pub use crate::renderer::widget::canvas;
- #[cfg(any(feature = "qr_code", feature = "glow_qr_code"))]
- #[cfg_attr(
- docsrs,
- doc(cfg(any(feature = "qr_code", feature = "glow_qr_code")))
- )]
- pub use crate::renderer::widget::qr_code;
+#[cfg(any(feature = "qr_code", feature = "glow_qr_code"))]
+#[cfg_attr(
+ docsrs,
+ doc(cfg(any(feature = "qr_code", feature = "glow_qr_code")))
+)]
+pub use crate::renderer::widget::qr_code;
- #[cfg_attr(docsrs, doc(cfg(feature = "image")))]
- pub mod image {
- //! Display images in your user interface.
- pub use crate::runtime::image::Handle;
- pub use crate::runtime::widget::image::viewer;
- pub use crate::runtime::widget::image::{Image, Viewer};
- }
-
- #[cfg_attr(docsrs, doc(cfg(feature = "svg")))]
- pub mod svg {
- //! Display vector graphics in your user interface.
- pub use crate::runtime::svg::Handle;
- pub use crate::runtime::widget::svg::Svg;
- }
-
- #[doc(no_inline)]
- pub use {
- button::Button, checkbox::Checkbox, container::Container, image::Image,
- pane_grid::PaneGrid, pick_list::PickList, progress_bar::ProgressBar,
- radio::Radio, rule::Rule, scrollable::Scrollable, slider::Slider,
- svg::Svg, text_input::TextInput, toggler::Toggler, tooltip::Tooltip,
- };
-
- #[cfg(any(feature = "canvas", feature = "glow_canvas"))]
- #[doc(no_inline)]
- pub use canvas::Canvas;
-
- #[cfg(any(feature = "qr_code", feature = "glow_qr_code"))]
- #[doc(no_inline)]
- pub use qr_code::QRCode;
+#[cfg_attr(docsrs, doc(cfg(feature = "image")))]
+pub mod image {
+ //! Display images in your user interface.
+ pub use crate::runtime::image::Handle;
+ pub use crate::runtime::widget::image::viewer;
+ pub use crate::runtime::widget::image::{Image, Viewer};
}
-#[cfg(target_arch = "wasm32")]
-mod platform {
- pub use iced_web::widget::*;
+#[cfg_attr(docsrs, doc(cfg(feature = "svg")))]
+pub mod svg {
+ //! Display vector graphics in your user interface.
+ pub use crate::runtime::svg::Handle;
+ pub use crate::runtime::widget::svg::Svg;
}
-pub use platform::*;
+#[doc(no_inline)]
+pub use {
+ button::Button, checkbox::Checkbox, container::Container, image::Image,
+ pane_grid::PaneGrid, pick_list::PickList, progress_bar::ProgressBar,
+ radio::Radio, rule::Rule, scrollable::Scrollable, slider::Slider, svg::Svg,
+ text_input::TextInput, toggler::Toggler, tooltip::Tooltip,
+};
+
+#[cfg(any(feature = "canvas", feature = "glow_canvas"))]
+#[doc(no_inline)]
+pub use canvas::Canvas;
+
+#[cfg(any(feature = "qr_code", feature = "glow_qr_code"))]
+#[doc(no_inline)]
+pub use qr_code::QRCode;