Rename horizontal_rule to rule and introduce Rule::vertical

This commit is contained in:
Héctor Ramón Jiménez 2025-09-11 06:51:53 +02:00
parent c70ce5af89
commit c684fbd6af
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
7 changed files with 63 additions and 86 deletions

View file

@ -3,8 +3,7 @@ use iced::keyboard;
use iced::mouse;
use iced::widget::{
button, canvas, center, center_y, checkbox, column, container,
horizontal_rule, horizontal_space, pick_list, pin, row, scrollable, stack,
text, vertical_rule,
horizontal_space, pick_list, pin, row, rule, scrollable, stack, text,
};
use iced::{
Center, Element, Fill, Font, Length, Point, Rectangle, Renderer, Shrink,
@ -295,7 +294,7 @@ fn quotes<'a>() -> Element<'a, Message> {
fn quote<'a>(
content: impl Into<Element<'a, Message>>,
) -> Element<'a, Message> {
row![vertical_rule(1), content.into()]
row![rule(1).vertical(), content.into()]
.spacing(10)
.height(Shrink)
.into()
@ -313,7 +312,7 @@ fn quotes<'a>() -> Element<'a, Message> {
reply("This is the original message", "This is a reply"),
"This is another reply",
),
horizontal_rule(1),
rule(1),
text("A separator ↑"),
]
.width(Shrink)