From 69ac47f463fd5c392f1f8e788fcf89b1a76abcae Mon Sep 17 00:00:00 2001
From: Héctor Ramón Jiménez <hector0193@gmail.com>
Date: Wed, 8 Jul 2020 07:04:20 +0200
Subject: Implement `font` method for `ComboBox`

---
 graphics/src/widget/combo_box.rs | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'graphics/src/widget')

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),
-- 
cgit