summaryrefslogtreecommitdiffstats
path: root/native/src/widget/text.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--native/src/widget/text.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/native/src/widget/text.rs b/native/src/widget/text.rs
index ea1ba7ac..a2438d9c 100644
--- a/native/src/widget/text.rs
+++ b/native/src/widget/text.rs
@@ -135,7 +135,7 @@ where
fn draw(
&self,
renderer: &mut Renderer,
- _defaults: &Renderer::Defaults,
+ style: &renderer::Style,
layout: Layout<'_>,
_cursor_position: Point,
_viewport: &Rectangle,
@@ -156,9 +156,9 @@ where
renderer.fill_text(renderer::text::Section {
content: &self.content,
- size: self.size.map(f32::from),
+ size: f32::from(self.size.unwrap_or(renderer.default_size())),
bounds: Rectangle { x, y, ..bounds },
- color: self.color,
+ color: self.color.unwrap_or(style.text_color),
font: self.font,
horizontal_alignment: self.horizontal_alignment,
vertical_alignment: self.vertical_alignment,