summaryrefslogtreecommitdiffstats
path: root/native/src/widget/rule.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2022-03-23 17:11:14 +0700
committerLibravatar GitHub <noreply@github.com>2022-03-23 17:11:14 +0700
commit0eef527fa5b04be74141c75b076677473320e321 (patch)
tree5062a9ce2c370632de87a01471526da1176e0a60 /native/src/widget/rule.rs
parent4aece6b77617f4a37af8208d8ddb1618bf9052d3 (diff)
parentef4c79ea23e86fec9a8ad0fb27463296c14400e5 (diff)
downloadiced-0eef527fa5b04be74141c75b076677473320e321.tar.gz
iced-0eef527fa5b04be74141c75b076677473320e321.tar.bz2
iced-0eef527fa5b04be74141c75b076677473320e321.zip
Merge pull request #1284 from iced-rs/virtual-widgets
Stateless widgets
Diffstat (limited to 'native/src/widget/rule.rs')
-rw-r--r--native/src/widget/rule.rs12
1 files changed, 6 insertions, 6 deletions
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(),