mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-18 13:55:23 -05:00
Revert "Merge branch 'master' of https://github.com/chrisduerr/alacritty into cursor-config"
Revert merge of bright foreground color branch into cursor-config.
This commit is contained in:
parent
94f7c57634
commit
b1057f1ea2
5 changed files with 1 additions and 30 deletions
|
@ -107,7 +107,6 @@ colors:
|
||||||
primary:
|
primary:
|
||||||
background: '0x000000'
|
background: '0x000000'
|
||||||
foreground: '0xeaeaea'
|
foreground: '0xeaeaea'
|
||||||
bright_foreground: '0xeaeaea'
|
|
||||||
|
|
||||||
cursor:
|
cursor:
|
||||||
# If this is `false` the text cursor inverses
|
# If this is `false` the text cursor inverses
|
||||||
|
|
|
@ -87,7 +87,6 @@ colors:
|
||||||
primary:
|
primary:
|
||||||
background: '0x000000'
|
background: '0x000000'
|
||||||
foreground: '0xeaeaea'
|
foreground: '0xeaeaea'
|
||||||
bright_foreground: '0xeaeaea'
|
|
||||||
|
|
||||||
cursor:
|
cursor:
|
||||||
# If this is `false` the text cursor inverses
|
# If this is `false` the text cursor inverses
|
||||||
|
|
|
@ -558,14 +558,11 @@ pub enum NamedColor {
|
||||||
DimCyan,
|
DimCyan,
|
||||||
/// Dim white
|
/// Dim white
|
||||||
DimWhite,
|
DimWhite,
|
||||||
/// The bright foreground color
|
|
||||||
BrightForeground,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl NamedColor {
|
impl NamedColor {
|
||||||
pub fn to_bright(&self) -> Self {
|
pub fn to_bright(&self) -> Self {
|
||||||
match *self {
|
match *self {
|
||||||
NamedColor::Foreground => NamedColor::BrightForeground,
|
|
||||||
NamedColor::Black => NamedColor::BrightBlack,
|
NamedColor::Black => NamedColor::BrightBlack,
|
||||||
NamedColor::Red => NamedColor::BrightRed,
|
NamedColor::Red => NamedColor::BrightRed,
|
||||||
NamedColor::Green => NamedColor::BrightGreen,
|
NamedColor::Green => NamedColor::BrightGreen,
|
||||||
|
|
|
@ -969,24 +969,6 @@ pub struct PrimaryColors {
|
||||||
pub background: Rgb,
|
pub background: Rgb,
|
||||||
#[serde(deserialize_with = "rgb_from_hex")]
|
#[serde(deserialize_with = "rgb_from_hex")]
|
||||||
pub foreground: Rgb,
|
pub foreground: Rgb,
|
||||||
#[serde(default, deserialize_with = "deserialize_bright_foreground")]
|
|
||||||
pub bright_foreground: Option<Rgb>,
|
|
||||||
}
|
|
||||||
|
|
||||||
fn deserialize_bright_foreground<'a, D>(deserializer: D) -> ::std::result::Result<Option<Rgb>, D::Error>
|
|
||||||
where D: de::Deserializer<'a>
|
|
||||||
{
|
|
||||||
match Option::deserialize(deserializer) {
|
|
||||||
Ok(Some(color)) => {
|
|
||||||
let color: serde_yaml::Value = color;
|
|
||||||
Ok(Some(rgb_from_hex(color).unwrap()))
|
|
||||||
},
|
|
||||||
Ok(None) => Ok(None),
|
|
||||||
Err(err) => {
|
|
||||||
eprintln!("problem with config: {}; Using standard foreground color", err);
|
|
||||||
Ok(None)
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for PrimaryColors {
|
impl Default for PrimaryColors {
|
||||||
|
@ -994,7 +976,6 @@ impl Default for PrimaryColors {
|
||||||
PrimaryColors {
|
PrimaryColors {
|
||||||
background: Rgb { r: 0, g: 0, b: 0 },
|
background: Rgb { r: 0, g: 0, b: 0 },
|
||||||
foreground: Rgb { r: 0xea, g: 0xea, b: 0xea },
|
foreground: Rgb { r: 0xea, g: 0xea, b: 0xea },
|
||||||
bright_foreground: None,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ use std::fmt;
|
||||||
use {Rgb, ansi};
|
use {Rgb, ansi};
|
||||||
use config::Colors;
|
use config::Colors;
|
||||||
|
|
||||||
pub const COUNT: usize = 269;
|
pub const COUNT: usize = 268;
|
||||||
|
|
||||||
/// List of indexed colors
|
/// List of indexed colors
|
||||||
///
|
///
|
||||||
|
@ -13,7 +13,6 @@ pub const COUNT: usize = 269;
|
||||||
/// the configured foreground color, item 257 is the configured background
|
/// the configured foreground color, item 257 is the configured background
|
||||||
/// color, item 258 is the cursor foreground color, item 259 is the cursor
|
/// color, item 258 is the cursor foreground color, item 259 is the cursor
|
||||||
/// background color. Following that are 8 positions for dim colors.
|
/// background color. Following that are 8 positions for dim colors.
|
||||||
/// Item 268 is the bright foreground color.
|
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
pub struct List([Rgb; COUNT]);
|
pub struct List([Rgb; COUNT]);
|
||||||
|
|
||||||
|
@ -51,10 +50,6 @@ impl List {
|
||||||
self[ansi::NamedColor::BrightMagenta] = colors.bright.magenta;
|
self[ansi::NamedColor::BrightMagenta] = colors.bright.magenta;
|
||||||
self[ansi::NamedColor::BrightCyan] = colors.bright.cyan;
|
self[ansi::NamedColor::BrightCyan] = colors.bright.cyan;
|
||||||
self[ansi::NamedColor::BrightWhite] = colors.bright.white;
|
self[ansi::NamedColor::BrightWhite] = colors.bright.white;
|
||||||
self[ansi::NamedColor::BrightForeground] = colors
|
|
||||||
.primary
|
|
||||||
.bright_foreground
|
|
||||||
.unwrap_or(colors.primary.foreground);
|
|
||||||
|
|
||||||
// Foreground and background
|
// Foreground and background
|
||||||
self[ansi::NamedColor::Foreground] = colors.primary.foreground;
|
self[ansi::NamedColor::Foreground] = colors.primary.foreground;
|
||||||
|
|
Loading…
Reference in a new issue