diff options
author | 2021-06-01 19:21:43 +0700 | |
---|---|---|
committer | 2021-06-01 19:21:43 +0700 | |
commit | b94cd7a2a83d81769d31f6379539089ce68cbdcd (patch) | |
tree | 63aac7f69dff9bb9f195e04d16c6a4f5b57b8683 /core | |
parent | 2e17d7860b6f857315f14341813645ca980a15df (diff) | |
download | iced-b94cd7a2a83d81769d31f6379539089ce68cbdcd.tar.gz iced-b94cd7a2a83d81769d31f6379539089ce68cbdcd.tar.bz2 iced-b94cd7a2a83d81769d31f6379539089ce68cbdcd.zip |
Use `Padding::horizontal` and `Padding::vertical` helpers
Diffstat (limited to 'core')
-rw-r--r-- | core/src/size.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/size.rs b/core/src/size.rs index 712caee2..6745c6c8 100644 --- a/core/src/size.rs +++ b/core/src/size.rs @@ -30,8 +30,8 @@ impl Size { /// Increments the [`Size`] to account for the given padding. pub fn pad(&self, padding: Padding) -> Self { Size { - width: self.width + (padding.left + padding.right) as f32, - height: self.height + (padding.top + padding.bottom) as f32, + width: self.width + padding.horizontal() as f32, + height: self.height + padding.vertical() as f32, } } } |