Remove Fill variant for Alignment
Implementing this generically in our `flex` logic has an exponential cost. Let's explore other options!
This commit is contained in:
parent
5f93437285
commit
9e815cb749
6 changed files with 14 additions and 72 deletions
|
|
@ -127,7 +127,8 @@ mod numeric_input {
|
|||
.horizontal_alignment(alignment::Horizontal::Center)
|
||||
.vertical_alignment(alignment::Vertical::Center),
|
||||
)
|
||||
.width(50)
|
||||
.width(40)
|
||||
.height(40)
|
||||
.on_press(on_press)
|
||||
};
|
||||
|
||||
|
|
@ -145,7 +146,7 @@ mod numeric_input {
|
|||
.padding(10),
|
||||
button("+", Event::IncrementPressed),
|
||||
]
|
||||
.align_items(Alignment::Fill)
|
||||
.align_items(Alignment::Center)
|
||||
.spacing(10)
|
||||
.into()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -254,7 +254,6 @@ impl Application for ScrollableDemo {
|
|||
scroll_to_beginning_button(),
|
||||
vertical_space(40),
|
||||
]
|
||||
.align_items(Alignment::Fill)
|
||||
.spacing(40),
|
||||
horizontal_space(1200),
|
||||
text("Horizontal - End!"),
|
||||
|
|
|
|||
|
|
@ -146,7 +146,9 @@ impl Application for WebSocket {
|
|||
}
|
||||
}
|
||||
|
||||
row![input, button].spacing(10).align_items(Alignment::Fill)
|
||||
row![input, button]
|
||||
.spacing(10)
|
||||
.align_items(Alignment::Center)
|
||||
};
|
||||
|
||||
column![message_log, new_message_input]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue