diff options
author | 2024-01-16 12:02:42 +0100 | |
---|---|---|
committer | 2024-01-16 12:02:42 +0100 | |
commit | 534c7dd7b0bc515c31b6de87b4aa6a35b44c46a0 (patch) | |
tree | 0ddc8f1b681cbade7e47293bd46a362896aa538a /examples/websocket | |
parent | 17135cbd56316f31167eb62e026839450506573f (diff) | |
parent | c4ba657de86d7606587dad5124f435141258f570 (diff) | |
download | iced-534c7dd7b0bc515c31b6de87b4aa6a35b44c46a0.tar.gz iced-534c7dd7b0bc515c31b6de87b4aa6a35b44c46a0.tar.bz2 iced-534c7dd7b0bc515c31b6de87b4aa6a35b44c46a0.zip |
Merge branch 'master' into update-winit
Diffstat (limited to 'examples/websocket')
-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) |