Use Padding::horizontal and Padding::vertical helpers

This commit is contained in:
Héctor Ramón 2021-06-01 19:21:43 +07:00
parent 2e17d7860b
commit b94cd7a2a8
5 changed files with 10 additions and 14 deletions

View file

@ -57,8 +57,7 @@ where
font: B::ICON_FONT,
size: bounds.height * style.icon_size,
bounds: Rectangle {
x: bounds.x + bounds.width
- f32::from(padding.left + padding.right),
x: bounds.x + bounds.width - f32::from(padding.horizontal()),
y: bounds.center_y(),
..bounds
},