feat: 添加 app/theme/ui/matrix/render 模块,重构 shader
This commit is contained in:
26
src/theme.rs
26
src/theme.rs
@@ -16,17 +16,17 @@ pub struct AppTheme {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub const ENGINEERING_DARK: AppTheme = AppTheme {
|
pub const ENGINEERING_DARK: AppTheme = AppTheme {
|
||||||
bg: egui::Color32::from_rgb(27, 34, 44),
|
bg: egui::Color32::from_rgb(33, 35, 44),
|
||||||
panel: egui::Color32::from_rgb(29, 40, 52),
|
panel: egui::Color32::from_rgb(25, 36, 48),
|
||||||
panel_strong: egui::Color32::from_rgb(39, 51, 65),
|
panel_strong: egui::Color32::from_rgb(47, 58, 70),
|
||||||
panel_deep: egui::Color32::from_rgb(15, 21, 29),
|
panel_deep: egui::Color32::from_rgb(14, 18, 24),
|
||||||
border: egui::Color32::from_rgb(70, 87, 104),
|
border: egui::Color32::from_rgb(53, 75, 92),
|
||||||
border_soft: egui::Color32::from_rgb(48, 63, 78),
|
border_soft: egui::Color32::from_rgb(36, 53, 66),
|
||||||
text: egui::Color32::from_rgb(224, 231, 238),
|
text: egui::Color32::from_rgb(210, 218, 232),
|
||||||
text_dim: egui::Color32::from_rgb(151, 166, 184),
|
text_dim: egui::Color32::from_rgb(155, 168, 190),
|
||||||
accent: egui::Color32::from_rgb(255, 121, 47),
|
accent: egui::Color32::from_rgb(255, 118, 47),
|
||||||
accent_hot: egui::Color32::from_rgb(255, 163, 82),
|
accent_hot: egui::Color32::from_rgb(255, 169, 77),
|
||||||
radius: 3,
|
radius: 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub fn apply_theme(ctx: &egui::Context, theme: &AppTheme) {
|
pub fn apply_theme(ctx: &egui::Context, theme: &AppTheme) {
|
||||||
@@ -47,13 +47,13 @@ pub fn apply_theme(ctx: &egui::Context, theme: &AppTheme) {
|
|||||||
visuals.widgets.inactive.bg_fill = theme.panel_strong;
|
visuals.widgets.inactive.bg_fill = theme.panel_strong;
|
||||||
visuals.widgets.inactive.bg_stroke = egui::Stroke::new(1.0, theme.border_soft);
|
visuals.widgets.inactive.bg_stroke = egui::Stroke::new(1.0, theme.border_soft);
|
||||||
visuals.widgets.inactive.fg_stroke = egui::Stroke::new(1.0, theme.text);
|
visuals.widgets.inactive.fg_stroke = egui::Stroke::new(1.0, theme.text);
|
||||||
visuals.widgets.hovered.bg_fill = egui::Color32::from_rgb(51, 66, 82);
|
visuals.widgets.hovered.bg_fill = egui::Color32::from_rgb(58, 69, 82);
|
||||||
visuals.widgets.hovered.bg_stroke = egui::Stroke::new(1.0, theme.border);
|
visuals.widgets.hovered.bg_stroke = egui::Stroke::new(1.0, theme.border);
|
||||||
visuals.widgets.hovered.fg_stroke = egui::Stroke::new(1.0, theme.text);
|
visuals.widgets.hovered.fg_stroke = egui::Stroke::new(1.0, theme.text);
|
||||||
visuals.widgets.active.bg_fill = theme.accent;
|
visuals.widgets.active.bg_fill = theme.accent;
|
||||||
visuals.widgets.active.bg_stroke = egui::Stroke::new(1.0, theme.accent_hot);
|
visuals.widgets.active.bg_stroke = egui::Stroke::new(1.0, theme.accent_hot);
|
||||||
visuals.widgets.active.fg_stroke = egui::Stroke::new(1.0, egui::Color32::WHITE);
|
visuals.widgets.active.fg_stroke = egui::Stroke::new(1.0, egui::Color32::WHITE);
|
||||||
visuals.widgets.open.bg_fill = egui::Color32::from_rgb(45, 58, 72);
|
visuals.widgets.open.bg_fill = egui::Color32::from_rgb(43, 55, 68);
|
||||||
visuals.widgets.open.bg_stroke = egui::Stroke::new(1.0, theme.border);
|
visuals.widgets.open.bg_stroke = egui::Stroke::new(1.0, theme.border);
|
||||||
visuals.widgets.open.fg_stroke = egui::Stroke::new(1.0, theme.text);
|
visuals.widgets.open.fg_stroke = egui::Stroke::new(1.0, theme.text);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user