diff options
author | 2024-01-12 14:41:40 +0100 | |
---|---|---|
committer | 2024-01-12 14:41:40 +0100 | |
commit | 50c310fd9f692eafb2350827636ffbd6d7b6c9b9 (patch) | |
tree | 0f1ab4182a0cce7469e01881c095e0c3988b3f9a /examples/websocket/src | |
parent | 63e9adac56e9a4f21ec82137329d7c455fbf630b (diff) | |
parent | 11474bdc3e1a43e6c167d7b98f22d87933dbd2b6 (diff) | |
download | iced-50c310fd9f692eafb2350827636ffbd6d7b6c9b9.tar.gz iced-50c310fd9f692eafb2350827636ffbd6d7b6c9b9.tar.bz2 iced-50c310fd9f692eafb2350827636ffbd6d7b6c9b9.zip |
Merge pull request #2192 from iced-rs/fix/layout-inconsistencies
Layout consistency
Diffstat (limited to 'examples/websocket/src')
-rw-r--r-- | examples/websocket/src/main.rs | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/examples/websocket/src/main.rs b/examples/websocket/src/main.rs index 920189f5..38a6db1e 100644 --- a/examples/websocket/src/main.rs +++ b/examples/websocket/src/main.rs @@ -3,7 +3,7 @@ mod echo; use iced::alignment::{self, Alignment}; use iced::executor; use iced::widget::{ - button, column, container, row, scrollable, text, text_input, Column, + button, column, container, row, scrollable, text, text_input, }; use iced::{ Application, Color, Command, Element, Length, Settings, Subscription, Theme, @@ -108,15 +108,9 @@ impl Application for WebSocket { .into() } else { scrollable( - Column::with_children( - self.messages - .iter() - .cloned() - .map(text) - .map(Element::from) - .collect(), + column( + self.messages.iter().cloned().map(text).map(Element::from), ) - .width(Length::Fill) .spacing(10), ) .id(MESSAGE_LOG.clone()) @@ -131,7 +125,7 @@ impl Application for WebSocket { let mut button = button( text("Send") - .height(Length::Fill) + .height(40) .vertical_alignment(alignment::Vertical::Center), ) .padding([0, 20]); @@ -149,7 +143,6 @@ impl Application for WebSocket { }; column![message_log, new_message_input] - .width(Length::Fill) .height(Length::Fill) .padding(20) .spacing(10) |