From 0fbd1d98b5534a85eaa8bff40f5fa1d395edc977 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 10 Mar 2022 16:58:55 +0700 Subject: Implement `pure` version of `Rule` widget --- pure/src/widget.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'pure/src/widget.rs') 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) +} -- cgit