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

card head_text_color doesn't seem to change color #246

Open
jondavis847 opened this issue May 28, 2024 · 3 comments
Open

card head_text_color doesn't seem to change color #246

jondavis847 opened this issue May 28, 2024 · 3 comments
Labels
good first issue Good for newcomers

Comments

@jondavis847
Copy link

I have a custom theme in iced 0.12.1.

#[derive(Debug, Clone, Copy, Default)]
pub enum Card {
    #[default]
    Default,
    Error,
}

impl iced_aw::style::card::StyleSheet for Theme {
    type Style = Card;

    fn active(&self, style: &Self::Style) -> iced_aw::style::card::Appearance {
        match style {
            Card::Default => iced_aw::style::card::Appearance {
                background: iced::Background::Color(self.background),
                head_background: iced::Background::Color(self.node_background),
                head_text_color: self.primary,
                border_color: self.border,
                ..iced_aw::style::card::Appearance::default()
            },
            Card::Error => {
                iced_aw::style::card::Appearance {
                    background: iced::Background::Color(self.background),
                    head_background: iced::Background::Color(self.error),
                    head_text_color: self.error,
                    border_color: self.border,
                    ..iced_aw::style::card::Appearance::default()
                }
            }
        }
    }
}

Changing the head background color for Default and Error both work as expected. However, attempting to change head_text_color to anything doesn't seem to have any affect. In the Error code above, the head_background and head_text_color should both be self.error which is red, but the text is still white. Trying other colors also seems to not have any affect.

image

@genusistimelord
Copy link
Collaborator

we are currently slowly working on migrating the theme system to the latest one found in iced master. This might fix some of these issues.

@genusistimelord genusistimelord added the good first issue Good for newcomers label Jun 11, 2024
@jondavis847
Copy link
Author

Excellent thanks. Should I wait for the release to close if it's fixed?

@genusistimelord
Copy link
Collaborator

If you can switch over to the main branch and give it a try. That also means switching to iced main branch too. If it's fixed let me know, and we can close this, otherwise leave it open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants