mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-13 20:53:07 +00:00
Grow horizontally as well
This commit is contained in:
parent
14cfe3604a
commit
065789c286
@ -364,7 +364,10 @@ impl TextArea {
|
||||
impl View for TextArea {
|
||||
fn required_size(&mut self, constraint: Vec2) -> Vec2 {
|
||||
self.compute_rows(constraint);
|
||||
Vec2::new(1, self.rows.len())
|
||||
Vec2::new(
|
||||
self.rows.iter().map(|r| r.width).max().unwrap_or(1),
|
||||
self.rows.len()
|
||||
)
|
||||
}
|
||||
|
||||
fn draw(&self, printer: &Printer) {
|
||||
|
Loading…
Reference in New Issue
Block a user