From 8559be9f921d283b9dbfb829c6c5c69137fa76ca Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Tue, 24 Aug 2021 17:11:27 -0600 Subject: [PATCH] Default unstyled text to be red instead of transparent --- gpui/src/fonts.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gpui/src/fonts.rs b/gpui/src/fonts.rs index e9f84676e7..ab387b65bb 100644 --- a/gpui/src/fonts.rs +++ b/gpui/src/fonts.rs @@ -14,12 +14,21 @@ pub struct FontId(pub usize); pub type GlyphId = u32; -#[derive(Clone, Debug, Default, PartialEq, Eq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct TextStyle { pub color: Color, pub font_properties: Properties, } +impl Default for TextStyle { + fn default() -> Self { + Self { + color: Color::from_u32(0xff0000ff), + font_properties: Default::default(), + } + } +} + #[allow(non_camel_case_types)] #[derive(Deserialize)] enum WeightJson {