diff options
author | denis <denismaximov98@gmail.com> | 2021-05-02 12:25:49 +0300 |
---|---|---|
committer | denis <denismaximov98@gmail.com> | 2021-05-02 12:25:49 +0300 |
commit | d48cc815368c6424977f3c6908e81e213fa260e1 (patch) | |
tree | d6021bf4edde3ea60319798aca175e768a23167a /zellij-tile/src | |
parent | 452940fb6530bc508d26c9ebaf6dd784751f6351 (diff) |
fix: don't have new on ColoredElements anymore, removed default for palette in zellij-tile
Diffstat (limited to 'zellij-tile/src')
-rw-r--r-- | zellij-tile/src/data.rs | 40 |
1 files changed, 10 insertions, 30 deletions
diff --git a/zellij-tile/src/data.rs b/zellij-tile/src/data.rs index 845385ca5..86100e7a7 100644 --- a/zellij-tile/src/data.rs +++ b/zellij-tile/src/data.rs @@ -72,23 +72,23 @@ pub enum Theme { Light, Dark, } +impl Default for Theme { + fn default() -> Theme { + Theme::Dark + } +} #[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, Hash)] pub enum PaletteSource { Default, Xresources, } -pub mod colors { - pub const WHITE: (u8, u8, u8) = (238, 238, 238); - pub const GREEN: (u8, u8, u8) = (175, 255, 0); - pub const GRAY: (u8, u8, u8) = (68, 68, 68); - pub const BRIGHT_GRAY: (u8, u8, u8) = (138, 138, 138); - pub const RED: (u8, u8, u8) = (135, 0, 0); - pub const ORANGE: (u8, u8, u8) = (215, 95, 0); - pub const BLACK: (u8, u8, u8) = (0, 0, 0); +impl Default for PaletteSource { + fn default() -> PaletteSource { + PaletteSource::Default + } } - -#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, Hash)] +#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, Hash, Default)] pub struct Palette { pub source: PaletteSource, pub theme: Theme, @@ -105,26 +105,6 @@ pub struct Palette { pub orange: (u8, u8, u8), } -impl Default for Palette { - fn default() -> Palette { - Palette { - source: PaletteSource::Default, - theme: Theme::Dark, - fg: colors::BRIGHT_GRAY, - bg: colors::BLACK, - black: colors::BLACK, - red: colors::RED, - green: colors::GREEN, - yellow: colors::GRAY, - blue: colors::GRAY, - magenta: colors::GRAY, - cyan: colors::GRAY, - white: colors::WHITE, - orange: colors::ORANGE, - } - } -} - /// Represents the contents of the help message that is printed in the status bar, /// which indicates the current [`InputMode`] and what the keybinds for that mode /// are. Related to the default `status-bar` plugin. |