Skip to content
Discussion options

You must be logged in to vote

@YgorSouza's answer to #3356 should apply (maybe you are still using Button::fill(), which overrides on-hover effects):

{
    let styles = ui.styles_mut();
    styles.visuals.widgets.inactive.weak_bg_fill = Color32::DARK_RED; // button at rest
    styles.visuals.widgets.hovered.weak_bg_fill = Color32::DARK_BLUE; // button on hover
}
let button = Button::new("test")
    .min_size(vec2(50., 50.));

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sukhmel
Comment options

Answer selected by sukhmel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants