summaryrefslogtreecommitdiffstats
path: root/examples/svg
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2025-01-24 15:55:24 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2025-01-24 15:55:24 +0100
commitf8337b8da7ff6bcf876b54d1c7dac460d2e03747 (patch)
tree495d96fc62b23af7ce2622e87892ca823f1c61fc /examples/svg
parent75a6f32a5ef49bb8e6d16506d84b07822a33c41b (diff)
downloadiced-f8337b8da7ff6bcf876b54d1c7dac460d2e03747.tar.gz
iced-f8337b8da7ff6bcf876b54d1c7dac460d2e03747.tar.bz2
iced-f8337b8da7ff6bcf876b54d1c7dac460d2e03747.zip
Add helper functions for alignment to `widget` module
Diffstat (limited to 'examples/svg')
-rw-r--r--examples/svg/src/main.rs12
1 files changed, 4 insertions, 8 deletions
diff --git a/examples/svg/src/main.rs b/examples/svg/src/main.rs
index 02cb85cc..c4be8fb8 100644
--- a/examples/svg/src/main.rs
+++ b/examples/svg/src/main.rs
@@ -1,4 +1,4 @@
-use iced::widget::{center, checkbox, column, container, svg};
+use iced::widget::{center, center_x, checkbox, column, svg};
use iced::{color, Element, Fill};
pub fn main() -> iced::Result {
@@ -46,12 +46,8 @@ impl Tiger {
checkbox("Apply a color filter", self.apply_color_filter)
.on_toggle(Message::ToggleColorFilter);
- center(
- column![svg, container(apply_color_filter).center_x(Fill)]
- .spacing(20)
- .height(Fill),
- )
- .padding(20)
- .into()
+ center(column![svg, center_x(apply_color_filter)].spacing(20))
+ .padding(20)
+ .into()
}
}