diff options
author | 2022-03-10 16:58:55 +0700 | |
---|---|---|
committer | 2022-03-10 16:58:55 +0700 | |
commit | 0fbd1d98b5534a85eaa8bff40f5fa1d395edc977 (patch) | |
tree | 68bbd8fcf243dc913f2f00978f638199342b2465 /pure/src/widget.rs | |
parent | 31d814b43c167ac63aa29e7a65820e3c83eb4b56 (diff) | |
download | iced-0fbd1d98b5534a85eaa8bff40f5fa1d395edc977.tar.gz iced-0fbd1d98b5534a85eaa8bff40f5fa1d395edc977.tar.bz2 iced-0fbd1d98b5534a85eaa8bff40f5fa1d395edc977.zip |
Implement `pure` version of `Rule` widget
Diffstat (limited to 'pure/src/widget.rs')
-rw-r--r-- | pure/src/widget.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pure/src/widget.rs b/pure/src/widget.rs index c516c1f2..bee21633 100644 --- a/pure/src/widget.rs +++ b/pure/src/widget.rs @@ -1,4 +1,5 @@ pub mod image; +pub mod rule; pub mod tree; mod button; @@ -25,6 +26,7 @@ pub use image::Image; pub use pick_list::PickList; pub use radio::Radio; pub use row::Row; +pub use rule::Rule; pub use scrollable::Scrollable; pub use slider::Slider; pub use space::Space; @@ -234,3 +236,13 @@ pub fn horizontal_space(width: Length) -> Space { pub fn vertical_space(height: Length) -> Space { Space::with_height(height) } + +/// Creates a horizontal [`Rule`] with the given height. +pub fn horizontal_rule<'a>(height: u16) -> Rule<'a> { + Rule::horizontal(height) +} + +/// Creates a vertical [`Rule`] with the given width. +pub fn vertical_rule<'a>(width: u16) -> Rule<'a> { + Rule::horizontal(width) +} |