For things like:
Factory::from_factory(move || {
let red = day == today;
Cell::from(Button::new(Text::new(day))).style(if red {
Style {
background: Some(Background::Color(Color::from_rgb8(255, 0, 0))),
text_color: Some(Color::from_rgb8(255, 255, 255)),
..Style::default()
}
} else {
Style {
background: Some(Background::Color(Color::from_rgb8(255, 255, 255))),
text_color: Some(Color::from_rgb8(0, 0, 0)),
..Style::default()
}
})
})
You can see there is a button going to be made, it used to be a text, and when it was a text, I had no issue with styling, there was no background color like what you see in the image (that blue background color). So why is it present with a button? and how do I stop it?
Full code:
pastebin/c142YgEk
repo:
github SpiderUnderUrBed/iced-calendar-rs