Rename space_{x,y} to space::{horizontal,vertical}

This commit is contained in:
Héctor Ramón Jiménez 2025-09-17 23:49:01 +02:00
parent 299eb54d6f
commit 611f89fc59
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
25 changed files with 143 additions and 142 deletions

View file

@ -1,6 +1,6 @@
use iced::widget::{
button, column, container, operation, progress_bar, radio, row, scrollable,
slider, space_x, space_y, text,
slider, space, text,
};
use iced::{Border, Center, Color, Element, Fill, Task, Theme};
@ -190,9 +190,9 @@ impl ScrollableDemo {
column![
scroll_to_end_button(),
text("Beginning!"),
space_y().height(1200),
space().height(1200),
text("Middle!"),
space_y().height(1200),
space().height(1200),
text("End!"),
scroll_to_beginning_button(),
]
@ -215,9 +215,9 @@ impl ScrollableDemo {
row![
scroll_to_end_button(),
text("Beginning!"),
space_x().width(1200),
space().width(1200),
text("Middle!"),
space_x().width(1200),
space().width(1200),
text("End!"),
scroll_to_beginning_button(),
]
@ -242,25 +242,25 @@ impl ScrollableDemo {
row![
column![
text("Let's do some scrolling!"),
space_y().height(2400)
space().height(2400)
],
scroll_to_end_button(),
text("Horizontal - Beginning!"),
space_x().width(1200),
space().width(1200),
//vertical content
column![
text("Horizontal - Middle!"),
scroll_to_end_button(),
text("Vertical - Beginning!"),
space_y().height(1200),
space().height(1200),
text("Vertical - Middle!"),
space_y().height(1200),
space().height(1200),
text("Vertical - End!"),
scroll_to_beginning_button(),
space_y().height(40),
space().height(40),
]
.spacing(40),
space_x().width(1200),
space().width(1200),
text("Horizontal - End!"),
scroll_to_beginning_button(),
]