update css handling
This commit is contained in:
@@ -2269,12 +2269,12 @@ impl crate::panes::PaneRenderer for NodeGraphPane {
|
||||
if self.track_id.is_none() || self.backend.is_none() {
|
||||
// Show message that no valid track is selected
|
||||
let painter = ui.painter();
|
||||
let bg_color = egui::Color32::from_gray(30);
|
||||
let bg_color = shared.theme.bg_color(&["#node-editor", ".pane-content"], ui.ctx(), egui::Color32::from_gray(30));
|
||||
painter.rect_filled(rect, 0.0, bg_color);
|
||||
|
||||
let text = "Select a MIDI or Audio track to view its node graph";
|
||||
let font_id = egui::FontId::proportional(16.0);
|
||||
let text_color = egui::Color32::from_gray(150);
|
||||
let text_color = shared.theme.text_color(&["#node-editor", ".text-secondary"], ui.ctx(), egui::Color32::from_gray(150));
|
||||
|
||||
let galley = painter.layout_no_wrap(text.to_string(), font_id, text_color);
|
||||
let text_pos = rect.center() - galley.size() / 2.0;
|
||||
@@ -2351,8 +2351,8 @@ impl crate::panes::PaneRenderer for NodeGraphPane {
|
||||
let bg_style = shared.theme.style(".node-graph-background", ui.ctx());
|
||||
let grid_style = shared.theme.style(".node-graph-grid", ui.ctx());
|
||||
|
||||
let bg_color = bg_style.background_color.unwrap_or(egui::Color32::from_gray(45));
|
||||
let grid_color = grid_style.background_color.unwrap_or(egui::Color32::from_gray(55));
|
||||
let bg_color = bg_style.background_color().unwrap_or(egui::Color32::from_gray(45));
|
||||
let grid_color = grid_style.background_color().unwrap_or(egui::Color32::from_gray(55));
|
||||
|
||||
// Draw breadcrumb bar when editing a subgraph
|
||||
let breadcrumb_height = if self.in_subgraph() { 28.0 } else { 0.0 };
|
||||
@@ -2363,10 +2363,12 @@ impl crate::panes::PaneRenderer for NodeGraphPane {
|
||||
egui::vec2(rect.width(), breadcrumb_height),
|
||||
);
|
||||
let painter = ui.painter();
|
||||
painter.rect_filled(breadcrumb_rect, 0.0, egui::Color32::from_gray(35));
|
||||
let bc_bg = shared.theme.bg_color(&["#node-editor", ".pane-header"], ui.ctx(), egui::Color32::from_gray(35));
|
||||
painter.rect_filled(breadcrumb_rect, 0.0, bc_bg);
|
||||
let bc_border = shared.theme.border_color(&["#node-editor", ".pane-header"], ui.ctx(), egui::Color32::from_gray(60));
|
||||
painter.line_segment(
|
||||
[breadcrumb_rect.left_bottom(), breadcrumb_rect.right_bottom()],
|
||||
egui::Stroke::new(1.0, egui::Color32::from_gray(60)),
|
||||
egui::Stroke::new(1.0, bc_border),
|
||||
);
|
||||
|
||||
// Draw clickable breadcrumb segments
|
||||
@@ -2378,9 +2380,9 @@ impl crate::panes::PaneRenderer for NodeGraphPane {
|
||||
for (i, segment) in segments.iter().enumerate() {
|
||||
let is_last = i == segments.len() - 1;
|
||||
let text_color = if is_last {
|
||||
egui::Color32::from_gray(220)
|
||||
shared.theme.text_color(&["#node-editor", ".text-primary"], ui.ctx(), egui::Color32::from_gray(220))
|
||||
} else {
|
||||
egui::Color32::from_rgb(100, 180, 255)
|
||||
shared.theme.text_color(&["#node-editor", ".text-secondary"], ui.ctx(), egui::Color32::from_rgb(100, 180, 255))
|
||||
};
|
||||
|
||||
let font_id = egui::FontId::proportional(13.0);
|
||||
|
||||
Reference in New Issue
Block a user