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 --- native/src/widget/rule.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'native/src/widget/rule.rs') diff --git a/native/src/widget/rule.rs b/native/src/widget/rule.rs index b0cc3768..69619583 100644 --- a/native/src/widget/rule.rs +++ b/native/src/widget/rule.rs @@ -15,20 +15,20 @@ pub struct Rule<'a> { } impl<'a> Rule<'a> { - /// Creates a horizontal [`Rule`] for dividing content by the given vertical spacing. - pub fn horizontal(spacing: u16) -> Self { + /// Creates a horizontal [`Rule`] with the given height. + pub fn horizontal(height: u16) -> Self { Rule { width: Length::Fill, - height: Length::from(Length::Units(spacing)), + height: Length::Units(height), is_horizontal: true, style_sheet: Default::default(), } } - /// Creates a vertical [`Rule`] for dividing content by the given horizontal spacing. - pub fn vertical(spacing: u16) -> Self { + /// Creates a vertical [`Rule`] with the given width. + pub fn vertical(width: u16) -> Self { Rule { - width: Length::from(Length::Units(spacing)), + width: Length::from(Length::Units(width)), height: Length::Fill, is_horizontal: false, style_sheet: Default::default(), -- cgit