commit 805e18261c4889e4e4291ec3afb6143bee2b47f0
parent 5ee415c1b493b46a2003ffd04bbfd15b9c2ed060
Author: kernelkind <kernelkind@gmail.com>
Date: Wed, 17 Apr 2024 13:36:24 -0400
Add warn color and highlight color
Use highlight color for 'connected' relay status. There doesn't seem to
be a better place to put it.
Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git 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
@@ -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,