Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

svg style cannot work with hovered when i use custom style for svg? #2429

Open
2 tasks done
rongjv opened this issue May 8, 2024 · 1 comment
Open
2 tasks done
Labels
bug Something isn't working

Comments

@rongjv
Copy link

rongjv commented May 8, 2024

Is there an existing issue for this?

  • I have searched the existing issues.

Is this issue related to iced?

  • My hardware is compatible and my graphics drivers are up-to-date.

What happened?

when i use svg custom style ,hovered status don't work

What is the expected behavior?

know why

Version

crates.io release

Operating System

Windows

Do you have any log output?

No response

@rongjv rongjv added the bug Something isn't working label May 8, 2024
@rongjv
Copy link
Author

rongjv commented May 8, 2024

struct MySvgStyle;

impl svg::StyleSheet for MySvgStyle {
type Style = iced::Theme;

fn appearance(&self, style: &Self::Style) -> svg::Appearance {
    svg::Appearance {
        color:Some(iced::Color::from_rgb8(0, 255, 0)),
    }
}
fn hovered(&self, style: &Self::Style) -> svg::Appearance {
    svg::Appearance {
        color:Some(iced::Color::from_rgb8(255, 0, 0)),
    }
}

}
this is my code,only appearance work,hovered don't work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant