diff --git a/src/widget/text/mod.rs b/src/widget/text/mod.rs index 80c8f89..a04a793 100644 --- a/src/widget/text/mod.rs +++ b/src/widget/text/mod.rs @@ -66,15 +66,15 @@ pub struct Text impl Text { - /// A left-aligned, non-wrapping, ellipsis-truncated white label at the - /// default 16 px size with the canvas default font. + /// A left-aligned, non-wrapping, ellipsis-truncated label in the theme's + /// primary text colour at the default 16 px size with the canvas default font. pub fn new( content: impl Into ) -> Self { Self { content: content.into(), size: Length::px( 16.0 ), - color: Color::WHITE, + color: crate::theme::palette().text_primary, align: TextAlign::Left, wrap: false, truncate: true, diff --git a/src/widget/text/tests.rs b/src/widget/text/tests.rs index cf5b6aa..de58150 100644 --- a/src/widget/text/tests.rs +++ b/src/widget/text/tests.rs @@ -12,7 +12,7 @@ fn new_uses_documented_defaults() let t = Text::new( "hello" ); assert_eq!( t.content, "hello" ); assert_eq!( t.size, crate::Length::px( 16.0 ) ); - assert_eq!( t.color, Color::WHITE ); + assert_eq!( t.color, crate::theme::palette().text_primary ); assert_eq!( t.align, TextAlign::Left ); }