Rename Padding::constrain to fit
This commit is contained in:
parent
ea4b3cd6ae
commit
7476663069
4 changed files with 5 additions and 5 deletions
|
|
@ -74,8 +74,8 @@ impl Padding {
|
|||
self.left + self.right
|
||||
}
|
||||
|
||||
/// Constrains the padding to fit between the inner & outer [`Size`]
|
||||
pub fn constrain(self, inner: Size, outer: Size) -> Self {
|
||||
/// Fits the [`Padding`] between the provided `inner` and `outer` [`Size`].
|
||||
pub fn fit(self, inner: Size, outer: Size) -> Self {
|
||||
let available = (outer - inner).max(Size::ZERO);
|
||||
|
||||
Padding {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue