summaryrefslogtreecommitdiffstats
path: root/core/src/padding.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-11-08 03:56:05 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-11-08 03:56:05 +0100
commit7476663069572adec25161b46c26570f864f736f (patch)
treec0d23f24bede3232a7148cbb88eed7eb0d737575 /core/src/padding.rs
parentea4b3cd6aeb3c4dcb5113389c85f577fd3714682 (diff)
downloadiced-7476663069572adec25161b46c26570f864f736f.tar.gz
iced-7476663069572adec25161b46c26570f864f736f.tar.bz2
iced-7476663069572adec25161b46c26570f864f736f.zip
Rename `Padding::constrain` to `fit`
Diffstat (limited to 'core/src/padding.rs')
-rw-r--r--core/src/padding.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/padding.rs b/core/src/padding.rs
index 64c95c89..ad5d1f0f 100644
--- a/core/src/padding.rs
+++ b/core/src/padding.rs
@@ -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 {