summaryrefslogtreecommitdiffstats
path: root/graphics/src/overlay
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@lich.io>2021-06-01 19:21:43 +0700
committerLibravatar Héctor Ramón <hector@lich.io>2021-06-01 19:21:43 +0700
commitb94cd7a2a83d81769d31f6379539089ce68cbdcd (patch)
tree63aac7f69dff9bb9f195e04d16c6a4f5b57b8683 /graphics/src/overlay
parent2e17d7860b6f857315f14341813645ca980a15df (diff)
downloadiced-b94cd7a2a83d81769d31f6379539089ce68cbdcd.tar.gz
iced-b94cd7a2a83d81769d31f6379539089ce68cbdcd.tar.bz2
iced-b94cd7a2a83d81769d31f6379539089ce68cbdcd.zip
Use `Padding::horizontal` and `Padding::vertical` helpers
Diffstat (limited to 'graphics/src/overlay')
-rw-r--r--graphics/src/overlay/menu.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/graphics/src/overlay/menu.rs b/graphics/src/overlay/menu.rs
index 443f1746..9e91a0ef 100644
--- a/graphics/src/overlay/menu.rs
+++ b/graphics/src/overlay/menu.rs
@@ -53,7 +53,7 @@ where
use std::f32;
let is_mouse_over = bounds.contains(cursor_position);
- let option_height = (text_size + padding.top + padding.bottom) as usize;
+ let option_height = (text_size + padding.vertical()) as usize;
let mut primitives = Vec::new();
@@ -72,7 +72,7 @@ where
x: bounds.x,
y: bounds.y + (option_height * i) as f32,
width: bounds.width,
- height: f32::from(text_size + padding.top + padding.bottom),
+ height: f32::from(text_size + padding.vertical()),
};
if is_selected {