From 1723e30d25f0c6068f9532448b016a89aa491a95 Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Thu, 31 Dec 2020 05:52:45 +0000 Subject: Use ConfigDeserialize for all config enums This fixes up all of the remaining enums which are used in the configuration file to make sure they all support fully case insensitive deserialization. Fixes #4611. --- alacritty_terminal/src/config/colors.rs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'alacritty_terminal/src/config/colors.rs') diff --git a/alacritty_terminal/src/config/colors.rs b/alacritty_terminal/src/config/colors.rs index df52f19f..f295da1c 100644 --- a/alacritty_terminal/src/config/colors.rs +++ b/alacritty_terminal/src/config/colors.rs @@ -178,7 +178,7 @@ impl Default for BrightColors { } } -#[derive(Deserialize, Clone, Debug, PartialEq, Eq)] +#[derive(ConfigDeserialize, Clone, Debug, PartialEq, Eq)] pub struct DimColors { pub black: Rgb, pub red: Rgb, @@ -189,3 +189,18 @@ pub struct DimColors { pub cyan: Rgb, pub white: Rgb, } + +impl Default for DimColors { + fn default() -> Self { + DimColors { + black: Rgb { r: 0x13, g: 0x14, b: 0x15 }, + red: Rgb { r: 0x86, g: 0x43, b: 0x43 }, + green: Rgb { r: 0x77, g: 0x7c, b: 0x44 }, + yellow: Rgb { r: 0x9e, g: 0x82, b: 0x4c }, + blue: Rgb { r: 0x55, g: 0x6a, b: 0x7d }, + magenta: Rgb { r: 0x75, g: 0x61, b: 0x7b }, + cyan: Rgb { r: 0x5b, g: 0x7d, b: 0x78 }, + white: Rgb { r: 0x82, g: 0x84, b: 0x82 }, + } + } +} -- cgit v1.2.3-54-g00ecf