summaryrefslogtreecommitdiffstats
path: root/examples/scrollable
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-07-12 18:40:54 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-07-12 18:43:25 +0200
commit7c3341760de74df2153ef367e502960f20f9c681 (patch)
tree945f3ad59d8da742e7246d6d4fc30f52ab010b6b /examples/scrollable
parent915c926c28f77ad7b401a17964408d27548543e6 (diff)
downloadiced-7c3341760de74df2153ef367e502960f20f9c681.tar.gz
iced-7c3341760de74df2153ef367e502960f20f9c681.tar.bz2
iced-7c3341760de74df2153ef367e502960f20f9c681.zip
Improve `Padding` ergonomics
We expose free functions for creating a `Padding` and methods with the same name to modify its fields.
Diffstat (limited to 'examples/scrollable')
-rw-r--r--examples/scrollable/src/main.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/scrollable/src/main.rs b/examples/scrollable/src/main.rs
index a1c23976..de4f2f9a 100644
--- a/examples/scrollable/src/main.rs
+++ b/examples/scrollable/src/main.rs
@@ -213,7 +213,7 @@ impl ScrollableDemo {
scroll_to_beginning_button(),
]
.align_x(Center)
- .padding([40, 0, 40, 0])
+ .padding([40, 0])
.spacing(40),
)
.direction(scrollable::Direction::Vertical(
@@ -239,7 +239,7 @@ impl ScrollableDemo {
]
.height(450)
.align_y(Center)
- .padding([0, 40, 0, 40])
+ .padding([0, 40])
.spacing(40),
)
.direction(scrollable::Direction::Horizontal(
@@ -281,7 +281,7 @@ impl ScrollableDemo {
scroll_to_beginning_button(),
]
.align_y(Center)
- .padding([0, 40, 0, 40])
+ .padding([0, 40])
.spacing(40),
)
.direction({