diff --git a/src/app_style.rs b/src/app_style.rs index 5a5296e..a86c40c 100644 --- a/src/app_style.rs +++ b/src/app_style.rs @@ -3,7 +3,7 @@ use crate::colors::{ }; use egui::{ epaint::Shadow, - style::{WidgetVisuals, Widgets}, + style::{Selection, WidgetVisuals, Widgets}, Button, Context, FontFamily, FontId, Rounding, Stroke, Style, TextStyle, Ui, Visuals, }; use strum::IntoEnumIterator; @@ -132,6 +132,13 @@ pub fn create_themed_visuals(theme: ColorTheme, default: Visuals) -> Visuals { hyperlink_color: theme.hyperlink_color, override_text_color: Some(theme.text_color), panel_fill: theme.panel_fill, + selection: Selection { + bg_fill: theme.selection_color, + stroke: Stroke { + width: 1.0, + color: theme.selection_color, + }, + }, widgets: Widgets { noninteractive: WidgetVisuals { bg_fill: theme.noninteractive_bg_fill, diff --git a/src/colors.rs b/src/colors.rs index eed5a30..79aee01 100644 --- a/src/colors.rs +++ b/src/colors.rs @@ -5,6 +5,8 @@ pub const PURPLE: Color32 = Color32::from_rgb(0xCC, 0x43, 0xC5); const GRAY_SECONDARY: Color32 = Color32::from_rgb(0x8A, 0x8A, 0x8A); const BLACK: Color32 = Color32::from_rgb(0x00, 0x00, 0x00); const RED_700: Color32 = Color32::from_rgb(0xC7, 0x37, 0x5A); +const GREEN_700: Color32 = Color32::from_rgb(0x24, 0xEC, 0xC9); +const ORANGE_700: Color32 = Color32::from_rgb(0xF6, 0xB1, 0x4A); // BACKGROUNDS const SEMI_DARKER_BG: Color32 = Color32::from_rgb(0x39, 0x39, 0x39); @@ -24,7 +26,9 @@ pub struct ColorTheme { pub extreme_bg_color: Color32, pub text_color: Color32, pub err_fg_color: Color32, + pub warn_fg_color: Color32, pub hyperlink_color: Color32, + pub selection_color: Color32, // WINDOW pub window_fill: Color32, @@ -49,7 +53,9 @@ pub fn desktop_dark_color_theme() -> ColorTheme { extreme_bg_color: SEMI_DARKER_BG, text_color: Color32::WHITE, err_fg_color: RED_700, + warn_fg_color: ORANGE_700, hyperlink_color: PURPLE, + selection_color: GREEN_700, // WINDOW window_fill: DARK_ISH_BG, @@ -82,7 +88,9 @@ pub fn light_color_theme() -> ColorTheme { extreme_bg_color: EVEN_DARKER_GRAY, text_color: BLACK, err_fg_color: RED_700, + warn_fg_color: ORANGE_700, hyperlink_color: PURPLE, + selection_color: GREEN_700, // WINDOW window_fill: MID_GRAY,