Rename horizontal_rule to rule and introduce Rule::vertical
This commit is contained in:
parent
c70ce5af89
commit
c684fbd6af
7 changed files with 63 additions and 86 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
use iced::keyboard;
|
||||
use iced::widget::{
|
||||
button, center_x, center_y, checkbox, column, container, horizontal_rule,
|
||||
pick_list, progress_bar, row, scrollable, slider, text, text_input,
|
||||
toggler, vertical_rule, vertical_space,
|
||||
button, center_x, center_y, checkbox, column, container, pick_list,
|
||||
progress_bar, row, rule, scrollable, slider, text, text_input, toggler,
|
||||
vertical_space,
|
||||
};
|
||||
use iced::{Center, Element, Fill, Shrink, Subscription, Theme};
|
||||
|
||||
|
|
@ -162,14 +162,14 @@ impl Styling {
|
|||
|
||||
let content = column![
|
||||
choose_theme,
|
||||
horizontal_rule(1),
|
||||
rule(1),
|
||||
text_input,
|
||||
buttons,
|
||||
slider(),
|
||||
progress_bar(),
|
||||
row![
|
||||
scroll_me,
|
||||
vertical_rule(1),
|
||||
rule(1).vertical(),
|
||||
column![check, check_disabled, toggle, disabled_toggle]
|
||||
.spacing(10)
|
||||
]
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ mod toast {
|
|||
use iced::theme;
|
||||
use iced::time::{self, Duration, Instant};
|
||||
use iced::widget::{
|
||||
button, column, container, horizontal_rule, horizontal_space, row, text,
|
||||
button, column, container, horizontal_space, row, rule, text,
|
||||
};
|
||||
use iced::window;
|
||||
use iced::{
|
||||
|
|
@ -254,7 +254,7 @@ mod toast {
|
|||
Status::Success => success,
|
||||
Status::Danger => danger,
|
||||
}),
|
||||
horizontal_rule(1),
|
||||
rule(1),
|
||||
container(text(toast.body.as_str()))
|
||||
.width(Fill)
|
||||
.padding(5)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue