diff options
author | 2020-09-19 18:44:27 +0200 | |
---|---|---|
committer | 2021-06-03 20:21:02 +0700 | |
commit | 52a185fbab728b85cf414d4997567f52ebc66205 (patch) | |
tree | 7592348bfd383d2de0c6af6fd7db4d76e9ffac5d /wgpu | |
parent | 1dce929dfcfd3f9acc06e3b55157d40eb06b1324 (diff) | |
download | iced-52a185fbab728b85cf414d4997567f52ebc66205.tar.gz iced-52a185fbab728b85cf414d4997567f52ebc66205.tar.bz2 iced-52a185fbab728b85cf414d4997567f52ebc66205.zip |
Implement `Toggler` widget for iced_native
Diffstat (limited to 'wgpu')
-rw-r--r-- | wgpu/src/widget.rs | 3 | ||||
-rw-r--r-- | wgpu/src/widget/toggler.rs | 9 |
2 files changed, 12 insertions, 0 deletions
diff --git a/wgpu/src/widget.rs b/wgpu/src/widget.rs index 304bb726..a575d036 100644 --- a/wgpu/src/widget.rs +++ b/wgpu/src/widget.rs @@ -20,6 +20,7 @@ pub mod rule; pub mod scrollable; pub mod slider; pub mod text_input; +pub mod toggler; pub mod tooltip; #[doc(no_inline)] @@ -45,6 +46,8 @@ pub use slider::Slider; #[doc(no_inline)] pub use text_input::TextInput; #[doc(no_inline)] +pub use toggler::Toggler; +#[doc(no_inline)] pub use tooltip::Tooltip; #[cfg(feature = "canvas")] diff --git a/wgpu/src/widget/toggler.rs b/wgpu/src/widget/toggler.rs new file mode 100644 index 00000000..dfcf759b --- /dev/null +++ b/wgpu/src/widget/toggler.rs @@ -0,0 +1,9 @@ +//! Show toggle controls using togglers. +use crate::Renderer; + +pub use iced_graphics::toggler::{Style, StyleSheet}; + +/// A toggler that can be toggled +/// +/// This is an alias of an `iced_native` toggler with an `iced_wgpu::Renderer`. +pub type Toggler<Message> = iced_native::Toggler<Message, Renderer>; |