summaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/config
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2020-12-31 05:52:45 +0000
committerGitHub <noreply@github.com>2020-12-31 05:52:45 +0000
commit1723e30d25f0c6068f9532448b016a89aa491a95 (patch)
tree543790b11a4fdc3c82f7f0b0ebc1cbc79d1c2009 /alacritty_terminal/src/config
parent0aa1df327bf5c3e7892ad13d949be7e598aafda9 (diff)
downloadalacritty-1723e30d25f0c6068f9532448b016a89aa491a95.tar.gz
alacritty-1723e30d25f0c6068f9532448b016a89aa491a95.zip
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.
Diffstat (limited to 'alacritty_terminal/src/config')
-rw-r--r--alacritty_terminal/src/config/colors.rs17
1 files changed, 16 insertions, 1 deletions
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 },
+ }
+ }
+}