Skip to content

Commit

Permalink
fix: fallback to renderer icon style if svg is symbolic
Browse files Browse the repository at this point in the history
  • Loading branch information
wash2 committed Sep 25, 2024
1 parent 5501ffa commit de478e9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions widget/src/svg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ where
_state: &Tree,
renderer: &mut Renderer,
theme: &Theme,
style: &renderer::Style,
renderer_style: &renderer::Style,
layout: Layout<'_>,
cursor: mouse::Cursor,
_viewport: &Rectangle,
Expand Down Expand Up @@ -272,7 +272,10 @@ where
Status::Idle
};

let style = theme.style(&self.class, status);
let mut style = theme.style(&self.class, status);
if self.symbolic && style.color.is_none() {
style.color = Some(renderer_style.icon_color);
}

let render = |renderer: &mut Renderer| {
renderer.draw_svg(
Expand Down

0 comments on commit de478e9

Please sign in to comment.