summaryrefslogtreecommitdiffstats
path: root/examples/pane_grid/src/main.rs
diff options
context:
space:
mode:
authorLibravatar Héctor <hector@hecrj.dev>2025-01-24 18:04:14 +0100
committerLibravatar GitHub <noreply@github.com>2025-01-24 18:04:14 +0100
commit654c4b37148bda655f0c6676845d2b4ead801f40 (patch)
tree495d96fc62b23af7ce2622e87892ca823f1c61fc /examples/pane_grid/src/main.rs
parent75a6f32a5ef49bb8e6d16506d84b07822a33c41b (diff)
parentf8337b8da7ff6bcf876b54d1c7dac460d2e03747 (diff)
downloadiced-654c4b37148bda655f0c6676845d2b4ead801f40.tar.gz
iced-654c4b37148bda655f0c6676845d2b4ead801f40.tar.bz2
iced-654c4b37148bda655f0c6676845d2b4ead801f40.zip
Merge pull request #2746 from iced-rs/alignment-helpers
Add helper functions for alignment to `widget` module
Diffstat (limited to 'examples/pane_grid/src/main.rs')
-rw-r--r--examples/pane_grid/src/main.rs13
1 files changed, 3 insertions, 10 deletions
diff --git a/examples/pane_grid/src/main.rs b/examples/pane_grid/src/main.rs
index 67f4d27f..17ba5804 100644
--- a/examples/pane_grid/src/main.rs
+++ b/examples/pane_grid/src/main.rs
@@ -1,7 +1,7 @@
use iced::keyboard;
use iced::widget::pane_grid::{self, PaneGrid};
use iced::widget::{
- button, column, container, responsive, row, scrollable, text,
+ button, center_y, column, container, responsive, row, scrollable, text,
};
use iced::{Center, Color, Element, Fill, Size, Subscription};
@@ -196,11 +196,7 @@ impl Example {
.on_drag(Message::Dragged)
.on_resize(10, Message::Resized);
- container(pane_grid)
- .width(Fill)
- .height(Fill)
- .padding(10)
- .into()
+ container(pane_grid).padding(10).into()
}
}
@@ -295,10 +291,7 @@ fn view_content<'a>(
.spacing(10)
.align_x(Center);
- container(scrollable(content))
- .center_y(Fill)
- .padding(5)
- .into()
+ center_y(scrollable(content)).padding(5).into()
}
fn view_controls<'a>(