diff options
author | 2022-02-12 18:02:29 +0700 | |
---|---|---|
committer | 2022-02-12 18:02:29 +0700 | |
commit | 09c96a6d8123a62411e2c461a018c3900dec71cb (patch) | |
tree | faf12bfd5e0aea54ea180786134f55d2754f6dfd /examples | |
parent | 4c61601aa3fe7f6735e27c27d379090d777b56f7 (diff) | |
download | iced-09c96a6d8123a62411e2c461a018c3900dec71cb.tar.gz iced-09c96a6d8123a62411e2c461a018c3900dec71cb.tar.bz2 iced-09c96a6d8123a62411e2c461a018c3900dec71cb.zip |
Add `max_width` to `Column` in `iced_pure`
Diffstat (limited to 'examples')
-rw-r--r-- | examples/pure/todos/src/main.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/examples/pure/todos/src/main.rs b/examples/pure/todos/src/main.rs index 9acc9fcc..e993c598 100644 --- a/examples/pure/todos/src/main.rs +++ b/examples/pure/todos/src/main.rs @@ -3,11 +3,18 @@ use iced::pure::widget::{ button, checkbox, column, container, row, scrollable, text, text_input, }; use iced::pure::{Application, Element, Text}; +use iced::window; use iced::{Command, Font, Length, Settings}; use serde::{Deserialize, Serialize}; pub fn main() -> iced::Result { - Todos::run(Settings::default()) + Todos::run(Settings { + window: window::Settings { + size: (500, 800), + ..window::Settings::default() + }, + ..Settings::default() + }) } #[derive(Debug)] @@ -184,6 +191,7 @@ impl Application for Todos { let content = column() .spacing(20) + .max_width(800) .push(title) .push(input) .push(controls) |