summaryrefslogtreecommitdiffstats
path: root/examples/pane_grid
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-03-31 01:19:28 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-03-31 01:21:51 +0200
commit749a9588d738de9c3ae734e6f026768c77eb3cce (patch)
tree719597f4577c9329e738389847ff9224c2ac075d /examples/pane_grid
parent6e9ab1cd6f5358d323040379e3aadbed2cc4f7f8 (diff)
downloadiced-749a9588d738de9c3ae734e6f026768c77eb3cce.tar.gz
iced-749a9588d738de9c3ae734e6f026768c77eb3cce.tar.bz2
iced-749a9588d738de9c3ae734e6f026768c77eb3cce.zip
Implement `padding` support for `Container`
Diffstat (limited to 'examples/pane_grid')
-rw-r--r--examples/pane_grid/src/main.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/pane_grid/src/main.rs b/examples/pane_grid/src/main.rs
index dafc396c..b4bbd68f 100644
--- a/examples/pane_grid/src/main.rs
+++ b/examples/pane_grid/src/main.rs
@@ -106,11 +106,10 @@ impl Sandbox for Example {
.on_resize(Message::Resized)
.on_key_press(handle_hotkey);
- Column::new()
+ Container::new(pane_grid)
.width(Length::Fill)
.height(Length::Fill)
.padding(10)
- .push(pane_grid)
.into()
}
}
@@ -213,9 +212,10 @@ impl Content {
.push(Text::new(format!("Pane {}", id)).size(30))
.push(controls);
- Container::new(Column::new().padding(5).push(content))
+ Container::new(content)
.width(Length::Fill)
.height(Length::Fill)
+ .padding(5)
.center_y()
.style(style::Pane {
is_focused: focus.is_some(),