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>
This commit is contained in:
committed by
William Casarin
parent
5ee415c1b4
commit
805e18261c
@@ -3,7 +3,7 @@ use crate::colors::{
|
|||||||
};
|
};
|
||||||
use egui::{
|
use egui::{
|
||||||
epaint::Shadow,
|
epaint::Shadow,
|
||||||
style::{WidgetVisuals, Widgets},
|
style::{Selection, WidgetVisuals, Widgets},
|
||||||
Button, Context, FontFamily, FontId, Rounding, Stroke, Style, TextStyle, Ui, Visuals,
|
Button, Context, FontFamily, FontId, Rounding, Stroke, Style, TextStyle, Ui, Visuals,
|
||||||
};
|
};
|
||||||
use strum::IntoEnumIterator;
|
use strum::IntoEnumIterator;
|
||||||
@@ -132,6 +132,13 @@ pub fn create_themed_visuals(theme: ColorTheme, default: Visuals) -> Visuals {
|
|||||||
hyperlink_color: theme.hyperlink_color,
|
hyperlink_color: theme.hyperlink_color,
|
||||||
override_text_color: Some(theme.text_color),
|
override_text_color: Some(theme.text_color),
|
||||||
panel_fill: theme.panel_fill,
|
panel_fill: theme.panel_fill,
|
||||||
|
selection: Selection {
|
||||||
|
bg_fill: theme.selection_color,
|
||||||
|
stroke: Stroke {
|
||||||
|
width: 1.0,
|
||||||
|
color: theme.selection_color,
|
||||||
|
},
|
||||||
|
},
|
||||||
widgets: Widgets {
|
widgets: Widgets {
|
||||||
noninteractive: WidgetVisuals {
|
noninteractive: WidgetVisuals {
|
||||||
bg_fill: theme.noninteractive_bg_fill,
|
bg_fill: theme.noninteractive_bg_fill,
|
||||||
|
|||||||
@@ -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 GRAY_SECONDARY: Color32 = Color32::from_rgb(0x8A, 0x8A, 0x8A);
|
||||||
const BLACK: Color32 = Color32::from_rgb(0x00, 0x00, 0x00);
|
const BLACK: Color32 = Color32::from_rgb(0x00, 0x00, 0x00);
|
||||||
const RED_700: Color32 = Color32::from_rgb(0xC7, 0x37, 0x5A);
|
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
|
// BACKGROUNDS
|
||||||
const SEMI_DARKER_BG: Color32 = Color32::from_rgb(0x39, 0x39, 0x39);
|
const SEMI_DARKER_BG: Color32 = Color32::from_rgb(0x39, 0x39, 0x39);
|
||||||
@@ -24,7 +26,9 @@ pub struct ColorTheme {
|
|||||||
pub extreme_bg_color: Color32,
|
pub extreme_bg_color: Color32,
|
||||||
pub text_color: Color32,
|
pub text_color: Color32,
|
||||||
pub err_fg_color: Color32,
|
pub err_fg_color: Color32,
|
||||||
|
pub warn_fg_color: Color32,
|
||||||
pub hyperlink_color: Color32,
|
pub hyperlink_color: Color32,
|
||||||
|
pub selection_color: Color32,
|
||||||
|
|
||||||
// WINDOW
|
// WINDOW
|
||||||
pub window_fill: Color32,
|
pub window_fill: Color32,
|
||||||
@@ -49,7 +53,9 @@ pub fn desktop_dark_color_theme() -> ColorTheme {
|
|||||||
extreme_bg_color: SEMI_DARKER_BG,
|
extreme_bg_color: SEMI_DARKER_BG,
|
||||||
text_color: Color32::WHITE,
|
text_color: Color32::WHITE,
|
||||||
err_fg_color: RED_700,
|
err_fg_color: RED_700,
|
||||||
|
warn_fg_color: ORANGE_700,
|
||||||
hyperlink_color: PURPLE,
|
hyperlink_color: PURPLE,
|
||||||
|
selection_color: GREEN_700,
|
||||||
|
|
||||||
// WINDOW
|
// WINDOW
|
||||||
window_fill: DARK_ISH_BG,
|
window_fill: DARK_ISH_BG,
|
||||||
@@ -82,7 +88,9 @@ pub fn light_color_theme() -> ColorTheme {
|
|||||||
extreme_bg_color: EVEN_DARKER_GRAY,
|
extreme_bg_color: EVEN_DARKER_GRAY,
|
||||||
text_color: BLACK,
|
text_color: BLACK,
|
||||||
err_fg_color: RED_700,
|
err_fg_color: RED_700,
|
||||||
|
warn_fg_color: ORANGE_700,
|
||||||
hyperlink_color: PURPLE,
|
hyperlink_color: PURPLE,
|
||||||
|
selection_color: GREEN_700,
|
||||||
|
|
||||||
// WINDOW
|
// WINDOW
|
||||||
window_fill: MID_GRAY,
|
window_fill: MID_GRAY,
|
||||||
|
|||||||
Reference in New Issue
Block a user