Make rule API consistent with space

This commit is contained in:
Héctor Ramón Jiménez 2025-09-19 18:09:59 +02:00
parent afac7be7d1
commit 8f87a2bc2e
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
7 changed files with 37 additions and 54 deletions

View file

@ -290,7 +290,7 @@ fn quotes<'a>() -> Element<'a, Message> {
fn quote<'a>(
content: impl Into<Element<'a, Message>>,
) -> Element<'a, Message> {
row![rule(1).vertical(), content.into()]
row![rule::vertical(1), content.into()]
.spacing(10)
.height(Shrink)
.into()
@ -308,7 +308,7 @@ fn quotes<'a>() -> Element<'a, Message> {
reply("This is the original message", "This is a reply"),
"This is another reply",
),
rule(1),
rule::horizontal(1),
text("A separator ↑"),
]
.width(Shrink)

View file

@ -162,14 +162,14 @@ impl Styling {
let content = column![
choose_theme,
rule(1),
rule::horizontal(1),
text_input,
buttons,
slider(),
progress_bar(),
row![
scroll_me,
rule(1).vertical(),
rule::vertical(1),
column![check, check_disabled, toggle, disabled_toggle]
.spacing(10)
]

View file

@ -252,7 +252,7 @@ mod toast {
Status::Success => success,
Status::Danger => danger,
}),
rule(1),
rule::horizontal(1),
container(text(toast.body.as_str()))
.width(Fill)
.padding(5)