Skip to content

Commit

Permalink
bug: fix incorrect colours for gruvbox-light
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementTsang committed Nov 28, 2024
1 parent 991cc3e commit 0fe8ead
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions src/options/config/style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ pub(crate) struct StyleConfig {
/// as a "palette".
#[derive(Debug)]
pub struct ColourPalette {
pub selected_text_style: Style,
pub table_header_style: Style,
pub ram_style: Style,
#[cfg(not(target_os = "windows"))]
pub cache_style: Style,
Expand All @@ -114,6 +112,8 @@ pub struct ColourPalette {
pub border_style: Style,
pub highlighted_border_style: Style,
pub text_style: Style,
pub selected_text_style: Style,
pub table_header_style: Style,
pub widget_title_style: Style,
pub graph_style: Style,
pub graph_legend_style: Style,
Expand Down
8 changes: 4 additions & 4 deletions src/options/config/style/themes/default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ impl ColourPalette {
const TEXT_COLOUR: Color = Color::Gray;

Self {
selected_text_style: DEFAULT_SELECTED_TEXT_STYLE,
table_header_style: color!(HIGHLIGHT_COLOUR).add_modifier(Modifier::BOLD),
ram_style: color!(FIRST_COLOUR),
#[cfg(not(target_os = "windows"))]
cache_style: color!(FIFTH_COLOUR),
Expand Down Expand Up @@ -55,6 +53,8 @@ impl ColourPalette {
border_style: color!(TEXT_COLOUR),
highlighted_border_style: color!(HIGHLIGHT_COLOUR),
text_style: color!(TEXT_COLOUR),
selected_text_style: DEFAULT_SELECTED_TEXT_STYLE,
table_header_style: color!(HIGHLIGHT_COLOUR).add_modifier(Modifier::BOLD),
widget_title_style: color!(TEXT_COLOUR),
graph_style: color!(TEXT_COLOUR),
graph_legend_style: color!(TEXT_COLOUR),
Expand All @@ -68,8 +68,6 @@ impl ColourPalette {

pub fn default_light_mode() -> Self {
Self {
selected_text_style: color!(Color::White).bg(Color::LightBlue),
table_header_style: color!(Color::Black).add_modifier(Modifier::BOLD),
ram_style: color!(Color::Blue),
#[cfg(not(target_os = "windows"))]
cache_style: color!(Color::LightRed),
Expand Down Expand Up @@ -99,6 +97,8 @@ impl ColourPalette {
],
border_style: color!(Color::Black),
text_style: color!(Color::Black),
selected_text_style: color!(Color::White).bg(Color::LightBlue),
table_header_style: color!(Color::Black).add_modifier(Modifier::BOLD),
widget_title_style: color!(Color::Black),
graph_style: color!(Color::Black),
graph_legend_style: color!(Color::Black),
Expand Down
26 changes: 13 additions & 13 deletions src/options/config/style/themes/gruvbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ use crate::options::config::style::{utils::convert_hex_to_color, ColourPalette};
impl ColourPalette {
pub(crate) fn gruvbox_palette() -> Self {
Self {
selected_text_style: hex!("#1d2021").bg(convert_hex_to_color("#ebdbb2").unwrap()),
table_header_style: hex!("#83a598").add_modifier(Modifier::BOLD),
ram_style: hex!("#8ec07c"),
#[cfg(not(target_os = "windows"))]
cache_style: hex!("#b16286"),
Expand Down Expand Up @@ -53,6 +51,8 @@ impl ColourPalette {
border_style: hex!("#ebdbb2"),
highlighted_border_style: hex!("#fe8019"),
text_style: hex!("#ebdbb2"),
selected_text_style: hex!("#1d2021").bg(convert_hex_to_color("#ebdbb2").unwrap()),
table_header_style: hex!("#83a598").add_modifier(Modifier::BOLD),
widget_title_style: hex!("#ebdbb2"),
graph_style: hex!("#ebdbb2"),
graph_legend_style: hex!("#ebdbb2"),
Expand All @@ -66,8 +66,6 @@ impl ColourPalette {

pub(crate) fn gruvbox_light_palette() -> Self {
Self {
selected_text_style: hex!("#ebdbb2").bg(convert_hex_to_color("#3c3836").unwrap()),
table_header_style: hex!("#076678").add_modifier(Modifier::BOLD),
ram_style: hex!("#427b58"),
#[cfg(not(target_os = "windows"))]
cache_style: hex!("#d79921"),
Expand Down Expand Up @@ -110,17 +108,19 @@ impl ColourPalette {
hex!("#d65d03"),
hex!("#af3a03"),
],
border_style: hex!("#ebdbb2"),
highlighted_border_style: hex!("#fe8019"),
text_style: hex!("#ebdbb2"),
widget_title_style: hex!("#ebdbb2"),
graph_style: hex!("#ebdbb2"),
graph_legend_style: hex!("#ebdbb2"),
border_style: hex!("#3c3836"),
highlighted_border_style: hex!("#af3a03"),
text_style: hex!("#3c3836"),
selected_text_style: hex!("#ebdbb2").bg(convert_hex_to_color("#3c3836").unwrap()),
table_header_style: hex!("#076678").add_modifier(Modifier::BOLD),
widget_title_style: hex!("#3c3836"),
graph_style: hex!("#3c3836"),
graph_legend_style: hex!("#3c3836"),
high_battery: hex!("#98971a"),
medium_battery: hex!("#fabd2f"),
low_battery: hex!("#fb4934"),
medium_battery: hex!("#d79921"),
low_battery: hex!("#cc241d"),
invalid_query_style: color!(Color::Red),
disabled_text_style: hex!("#665c54"),
disabled_text_style: hex!("#d5c4a1"),
}
}
}
8 changes: 4 additions & 4 deletions src/options/config/style/themes/nord.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ use crate::options::config::style::{utils::convert_hex_to_color, ColourPalette};
impl ColourPalette {
pub(crate) fn nord_palette() -> Self {
Self {
selected_text_style: hex!("#2e3440").bg(convert_hex_to_color("#88c0d0").unwrap()),
table_header_style: hex!("#81a1c1").add_modifier(Modifier::BOLD),
ram_style: hex!("#88c0d0"),
#[cfg(not(target_os = "windows"))]
cache_style: hex!("#d8dee9"),
Expand Down Expand Up @@ -41,6 +39,8 @@ impl ColourPalette {
border_style: hex!("#88c0d0"),
highlighted_border_style: hex!("#5e81ac"),
text_style: hex!("#e5e9f0"),
selected_text_style: hex!("#2e3440").bg(convert_hex_to_color("#88c0d0").unwrap()),
table_header_style: hex!("#81a1c1").add_modifier(Modifier::BOLD),
widget_title_style: hex!("#e5e9f0"),
graph_style: hex!("#e5e9f0"),
graph_legend_style: hex!("#e5e9f0"),
Expand All @@ -54,8 +54,6 @@ impl ColourPalette {

pub(crate) fn nord_light_palette() -> Self {
Self {
selected_text_style: hex!("#f5f5f5").bg(convert_hex_to_color("#5e81ac").unwrap()),
table_header_style: hex!("#5e81ac").add_modifier(Modifier::BOLD),
ram_style: hex!("#81a1c1"),
#[cfg(not(target_os = "windows"))]
cache_style: hex!("#4c566a"),
Expand Down Expand Up @@ -89,6 +87,8 @@ impl ColourPalette {
border_style: hex!("#2e3440"),
highlighted_border_style: hex!("#5e81ac"),
text_style: hex!("#2e3440"),
selected_text_style: hex!("#f5f5f5").bg(convert_hex_to_color("#5e81ac").unwrap()),
table_header_style: hex!("#5e81ac").add_modifier(Modifier::BOLD),
widget_title_style: hex!("#2e3440"),
graph_style: hex!("#2e3440"),
graph_legend_style: hex!("#2e3440"),
Expand Down

0 comments on commit 0fe8ead

Please sign in to comment.