summaryrefslogtreecommitdiffstats
path: root/graphics/src/widget
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-07-08 07:04:20 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-07-08 11:29:21 +0200
commit69ac47f463fd5c392f1f8e788fcf89b1a76abcae (patch)
treef4a4f6618766acd15d1d7ca726668c07ec9857dc /graphics/src/widget
parent1c12bad866d06b320f16609576d5937413418a0c (diff)
downloadiced-69ac47f463fd5c392f1f8e788fcf89b1a76abcae.tar.gz
iced-69ac47f463fd5c392f1f8e788fcf89b1a76abcae.tar.bz2
iced-69ac47f463fd5c392f1f8e788fcf89b1a76abcae.zip
Implement `font` method for `ComboBox`
Diffstat (limited to 'graphics/src/widget')
-rw-r--r--graphics/src/widget/combo_box.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/graphics/src/widget/combo_box.rs b/graphics/src/widget/combo_box.rs
index 078b5def..e7ed4e04 100644
--- a/graphics/src/widget/combo_box.rs
+++ b/graphics/src/widget/combo_box.rs
@@ -29,8 +29,9 @@ where
bounds: Rectangle,
cursor_position: Point,
selected: Option<String>,
- text_size: u16,
padding: u16,
+ text_size: u16,
+ font: Font,
style: &Box<dyn StyleSheet>,
) -> Self::Output {
let is_mouse_over = bounds.contains(cursor_position);
@@ -69,7 +70,7 @@ where
let label = Primitive::Text {
content: label,
size: f32::from(text_size),
- font: Font::Default,
+ font,
color: style.text_color,
bounds: Rectangle {
x: bounds.x + f32::from(padding),