Checkpoint Broken
This commit is contained in:
parent
5361a499ae
commit
7be12cb7b1
7 changed files with 99 additions and 45 deletions
|
@ -1,6 +1,6 @@
|
||||||
use gpui::{hsla, Hsla, Rgba};
|
use gpui::{hsla, Hsla, Rgba};
|
||||||
|
|
||||||
use crate::colors::{StatusColors, SystemColors, ThemeColors};
|
use crate::colors::{SystemColors, ThemeColors};
|
||||||
use crate::scale::{ColorScaleSet, ColorScales};
|
use crate::scale::{ColorScaleSet, ColorScales};
|
||||||
use crate::syntax::SyntaxTheme;
|
use crate::syntax::SyntaxTheme;
|
||||||
use crate::{ColorScale, PlayerColor, PlayerColors};
|
use crate::{ColorScale, PlayerColor, PlayerColors};
|
||||||
|
@ -99,7 +99,7 @@ impl PlayerColors {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn neutral() -> ColorScaleSet {
|
pub(crate) fn neutral() -> ColorScaleSet {
|
||||||
slate()
|
slate()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -452,7 +452,7 @@ pub fn default_color_scales() -> ColorScales {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn gray() -> ColorScaleSet {
|
pub(crate) fn gray() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "Gray",
|
scale: "Gray",
|
||||||
light: [
|
light: [
|
||||||
|
@ -516,7 +516,7 @@ fn gray() -> ColorScaleSet {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn mauve() -> ColorScaleSet {
|
pub(crate) fn mauve() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "Mauve",
|
scale: "Mauve",
|
||||||
light: [
|
light: [
|
||||||
|
@ -580,7 +580,7 @@ fn mauve() -> ColorScaleSet {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn slate() -> ColorScaleSet {
|
pub(crate) fn slate() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "Slate",
|
scale: "Slate",
|
||||||
light: [
|
light: [
|
||||||
|
@ -644,7 +644,7 @@ fn slate() -> ColorScaleSet {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn sage() -> ColorScaleSet {
|
pub(crate) fn sage() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "Sage",
|
scale: "Sage",
|
||||||
light: [
|
light: [
|
||||||
|
@ -708,7 +708,7 @@ fn sage() -> ColorScaleSet {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn olive() -> ColorScaleSet {
|
pub(crate) fn olive() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "Olive",
|
scale: "Olive",
|
||||||
light: [
|
light: [
|
||||||
|
@ -772,7 +772,7 @@ fn olive() -> ColorScaleSet {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn sand() -> ColorScaleSet {
|
pub(crate) fn sand() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "Sand",
|
scale: "Sand",
|
||||||
light: [
|
light: [
|
||||||
|
@ -836,7 +836,7 @@ fn sand() -> ColorScaleSet {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn gold() -> ColorScaleSet {
|
pub(crate) fn gold() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "Gold",
|
scale: "Gold",
|
||||||
light: [
|
light: [
|
||||||
|
@ -900,7 +900,7 @@ fn gold() -> ColorScaleSet {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn bronze() -> ColorScaleSet {
|
pub(crate) fn bronze() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "Bronze",
|
scale: "Bronze",
|
||||||
light: [
|
light: [
|
||||||
|
@ -964,7 +964,7 @@ fn bronze() -> ColorScaleSet {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn brown() -> ColorScaleSet {
|
pub(crate) fn brown() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "Brown",
|
scale: "Brown",
|
||||||
light: [
|
light: [
|
||||||
|
@ -1028,7 +1028,7 @@ fn brown() -> ColorScaleSet {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn yellow() -> ColorScaleSet {
|
pub(crate) fn yellow() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "Yellow",
|
scale: "Yellow",
|
||||||
light: [
|
light: [
|
||||||
|
@ -1092,7 +1092,7 @@ fn yellow() -> ColorScaleSet {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn amber() -> ColorScaleSet {
|
pub(crate) fn amber() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "Amber",
|
scale: "Amber",
|
||||||
light: [
|
light: [
|
||||||
|
@ -1156,7 +1156,7 @@ fn amber() -> ColorScaleSet {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn orange() -> ColorScaleSet {
|
pub(crate) fn orange() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "Orange",
|
scale: "Orange",
|
||||||
light: [
|
light: [
|
||||||
|
@ -1220,7 +1220,7 @@ fn orange() -> ColorScaleSet {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn tomato() -> ColorScaleSet {
|
pub(crate) fn tomato() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "Tomato",
|
scale: "Tomato",
|
||||||
light: [
|
light: [
|
||||||
|
@ -1284,7 +1284,7 @@ fn tomato() -> ColorScaleSet {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn red() -> ColorScaleSet {
|
pub(crate) fn red() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "Red",
|
scale: "Red",
|
||||||
light: [
|
light: [
|
||||||
|
@ -1348,7 +1348,7 @@ fn red() -> ColorScaleSet {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn ruby() -> ColorScaleSet {
|
pub(crate) fn ruby() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "Ruby",
|
scale: "Ruby",
|
||||||
light: [
|
light: [
|
||||||
|
@ -1412,7 +1412,7 @@ fn ruby() -> ColorScaleSet {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn crimson() -> ColorScaleSet {
|
pub(crate) fn crimson() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "Crimson",
|
scale: "Crimson",
|
||||||
light: [
|
light: [
|
||||||
|
@ -1476,7 +1476,7 @@ fn crimson() -> ColorScaleSet {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn pink() -> ColorScaleSet {
|
pub(crate) fn pink() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "Pink",
|
scale: "Pink",
|
||||||
light: [
|
light: [
|
||||||
|
@ -1540,7 +1540,7 @@ fn pink() -> ColorScaleSet {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn plum() -> ColorScaleSet {
|
pub(crate) fn plum() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "Plum",
|
scale: "Plum",
|
||||||
light: [
|
light: [
|
||||||
|
@ -1604,7 +1604,7 @@ fn plum() -> ColorScaleSet {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn purple() -> ColorScaleSet {
|
pub(crate) fn purple() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "Purple",
|
scale: "Purple",
|
||||||
light: [
|
light: [
|
||||||
|
@ -1668,7 +1668,7 @@ fn purple() -> ColorScaleSet {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn violet() -> ColorScaleSet {
|
pub(crate) fn violet() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "Violet",
|
scale: "Violet",
|
||||||
light: [
|
light: [
|
||||||
|
@ -1732,7 +1732,7 @@ fn violet() -> ColorScaleSet {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn iris() -> ColorScaleSet {
|
pub(crate) fn iris() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "Iris",
|
scale: "Iris",
|
||||||
light: [
|
light: [
|
||||||
|
@ -1796,7 +1796,7 @@ fn iris() -> ColorScaleSet {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn indigo() -> ColorScaleSet {
|
pub(crate) fn indigo() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "Indigo",
|
scale: "Indigo",
|
||||||
light: [
|
light: [
|
||||||
|
@ -1860,7 +1860,7 @@ fn indigo() -> ColorScaleSet {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn blue() -> ColorScaleSet {
|
pub(crate) fn blue() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "Blue",
|
scale: "Blue",
|
||||||
light: [
|
light: [
|
||||||
|
@ -1924,7 +1924,7 @@ fn blue() -> ColorScaleSet {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn cyan() -> ColorScaleSet {
|
pub(crate) fn cyan() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "Cyan",
|
scale: "Cyan",
|
||||||
light: [
|
light: [
|
||||||
|
@ -1988,7 +1988,7 @@ fn cyan() -> ColorScaleSet {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn teal() -> ColorScaleSet {
|
pub(crate) fn teal() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "Teal",
|
scale: "Teal",
|
||||||
light: [
|
light: [
|
||||||
|
@ -2052,7 +2052,7 @@ fn teal() -> ColorScaleSet {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn jade() -> ColorScaleSet {
|
pub(crate) fn jade() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "Jade",
|
scale: "Jade",
|
||||||
light: [
|
light: [
|
||||||
|
@ -2116,7 +2116,7 @@ fn jade() -> ColorScaleSet {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn green() -> ColorScaleSet {
|
pub(crate) fn green() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "Green",
|
scale: "Green",
|
||||||
light: [
|
light: [
|
||||||
|
@ -2180,7 +2180,7 @@ fn green() -> ColorScaleSet {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn grass() -> ColorScaleSet {
|
pub(crate) fn grass() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "Grass",
|
scale: "Grass",
|
||||||
light: [
|
light: [
|
||||||
|
@ -2244,7 +2244,7 @@ fn grass() -> ColorScaleSet {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn lime() -> ColorScaleSet {
|
pub(crate) fn lime() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "Lime",
|
scale: "Lime",
|
||||||
light: [
|
light: [
|
||||||
|
@ -2308,7 +2308,7 @@ fn lime() -> ColorScaleSet {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn mint() -> ColorScaleSet {
|
pub(crate) fn mint() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "Mint",
|
scale: "Mint",
|
||||||
light: [
|
light: [
|
||||||
|
@ -2372,7 +2372,7 @@ fn mint() -> ColorScaleSet {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn sky() -> ColorScaleSet {
|
pub(crate) fn sky() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "Sky",
|
scale: "Sky",
|
||||||
light: [
|
light: [
|
||||||
|
@ -2436,7 +2436,7 @@ fn sky() -> ColorScaleSet {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn black() -> ColorScaleSet {
|
pub(crate) fn black() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "Black",
|
scale: "Black",
|
||||||
light: [
|
light: [
|
||||||
|
@ -2500,7 +2500,7 @@ fn black() -> ColorScaleSet {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn white() -> ColorScaleSet {
|
pub(crate) fn white() -> ColorScaleSet {
|
||||||
StaticColorScaleSet {
|
StaticColorScaleSet {
|
||||||
scale: "White",
|
scale: "White",
|
||||||
light: [
|
light: [
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
mod colors;
|
||||||
|
mod players;
|
||||||
mod status;
|
mod status;
|
||||||
|
mod syntax;
|
||||||
|
mod system;
|
||||||
|
|
||||||
use status::*;
|
pub use colors::*;
|
||||||
|
pub use players::*;
|
||||||
|
pub use status::*;
|
||||||
|
pub use syntax::*;
|
||||||
|
pub use system::*;
|
||||||
|
|
|
@ -1,15 +1,8 @@
|
||||||
use crate::{PlayerColors, SyntaxTheme};
|
|
||||||
use gpui::Hsla;
|
use gpui::Hsla;
|
||||||
use refineable::Refineable;
|
use refineable::Refineable;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
#[derive(Clone)]
|
use crate::{PlayerColors, SyntaxTheme, SystemColors};
|
||||||
pub struct SystemColors {
|
|
||||||
pub transparent: Hsla,
|
|
||||||
pub mac_os_traffic_light_red: Hsla,
|
|
||||||
pub mac_os_traffic_light_yellow: Hsla,
|
|
||||||
pub mac_os_traffic_light_green: Hsla,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Refineable, Clone, Debug)]
|
#[derive(Refineable, Clone, Debug)]
|
||||||
#[refineable(Debug, serde::Deserialize)]
|
#[refineable(Debug, serde::Deserialize)]
|
|
@ -1,4 +1,29 @@
|
||||||
use crate::StatusColors;
|
use gpui::Hsla;
|
||||||
|
|
||||||
|
use crate::{blue, grass, neutral, red, yellow, StatusColors};
|
||||||
|
|
||||||
|
impl Default for StatusColors {
|
||||||
|
/// Don't use this!
|
||||||
|
/// We have to have a default for StatusColors to be `[refineable::Refinable]`.
|
||||||
|
fn default() -> Self {
|
||||||
|
Self::dark()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub struct DiagnosticColors {
|
||||||
|
pub error: Hsla,
|
||||||
|
pub warning: Hsla,
|
||||||
|
pub info: Hsla,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub struct GitStatusColors {
|
||||||
|
pub created: Hsla,
|
||||||
|
pub deleted: Hsla,
|
||||||
|
pub modified: Hsla,
|
||||||
|
pub renamed: Hsla,
|
||||||
|
pub conflict: Hsla,
|
||||||
|
pub ignored: Hsla,
|
||||||
|
}
|
||||||
|
|
||||||
impl StatusColors {
|
impl StatusColors {
|
||||||
pub fn dark() -> Self {
|
pub fn dark() -> Self {
|
||||||
|
@ -38,4 +63,23 @@ impl StatusColors {
|
||||||
warning: yellow().light().step_9(),
|
warning: yellow().light().step_9(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn diagnostic(&self) -> DiagnosticColors {
|
||||||
|
DiagnosticColors {
|
||||||
|
error: self.error,
|
||||||
|
warning: self.warning,
|
||||||
|
info: self.info,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn git(&self) -> GitStatusColors {
|
||||||
|
GitStatusColors {
|
||||||
|
created: self.created,
|
||||||
|
deleted: self.deleted,
|
||||||
|
modified: self.modified,
|
||||||
|
renamed: self.renamed,
|
||||||
|
conflict: self.conflict,
|
||||||
|
ignored: self.ignored,
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
9
crates/theme2/src/styles/system.rs
Normal file
9
crates/theme2/src/styles/system.rs
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
use gpui::Hsla;
|
||||||
|
|
||||||
|
#[derive(Clone)]
|
||||||
|
pub struct SystemColors {
|
||||||
|
pub transparent: Hsla,
|
||||||
|
pub mac_os_traffic_light_red: Hsla,
|
||||||
|
pub mac_os_traffic_light_yellow: Hsla,
|
||||||
|
pub mac_os_traffic_light_green: Hsla,
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue