summaryrefslogtreecommitdiffstats
path: root/examples/websocket
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-01-05 17:24:43 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-01-10 10:01:49 +0100
commit22226394f7b1a0e0205b9bb5b3ef9b85a3b406f5 (patch)
tree22214a4ac6bca5033f6d5a227934288019f6ca60 /examples/websocket
parent0322e820eb40d36a7425246278b7bcb22b7010aa (diff)
downloadiced-22226394f7b1a0e0205b9bb5b3ef9b85a3b406f5.tar.gz
iced-22226394f7b1a0e0205b9bb5b3ef9b85a3b406f5.tar.bz2
iced-22226394f7b1a0e0205b9bb5b3ef9b85a3b406f5.zip
Introduce `Widget::size_hint` and fix further layout inconsistencies
Diffstat (limited to 'examples/websocket')
-rw-r--r--examples/websocket/src/main.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/examples/websocket/src/main.rs b/examples/websocket/src/main.rs
index 5fdf6657..59488e69 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,13 +108,8 @@ 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),
)
.spacing(10),
)