Improve UI docs, pointing to Ui::available_size

Closes #541
This commit is contained in:
Emil Ernerfeldt 2021-08-15 17:03:24 +02:00
parent 9bbcfd5996
commit a48c69d809

View file

@ -579,7 +579,7 @@ impl Ui {
/// ## How sizes are negotiated
/// Each widget should have a *minimum desired size* and a *desired size*.
/// When asking for space, ask AT LEAST for your minimum, and don't ask for more than you need.
/// If you want to fill the space, ask about `available().size()` and use that.
/// If you want to fill the space, ask about [`Ui::available_size`] and use that.
///
/// You may get MORE space than you asked for, for instance
/// for justified layouts, like in menus.
@ -624,7 +624,7 @@ impl Ui {
/// ## How sizes are negotiated
/// Each widget should have a *minimum desired size* and a *desired size*.
/// When asking for space, ask AT LEAST for your minimum, and don't ask for more than you need.
/// If you want to fill the space, ask about `available().size()` and use that.
/// If you want to fill the space, ask about [`Ui::available_size`] and use that.
///
/// You may get MORE space than you asked for, for instance
/// for justified layouts, like in menus.