Themes and Custom StyleBox for Buttons

Godot Version

Godot Engine v4.3.stable.steam.77dcf97d8

Question

I have two buttons, both using the same theme. This theme also has settings for other nodes, like labels and containers. In this theme, I decided to create a custom StyleBox for the hover state background. I made a new one, changed the color, and saved it. Saved the theme, saved the scene.

For one button—the one where I did all the work—the hover background appears as expected. But for the other button, it doesn’t. When I check the hover state of the second button, it shows the custom color in hover state, but it just doesn’t apply.

Could you please help me figure this out? I’m getting frustrated. It feels like I’m either missing some settings or doing something wrong.




image

In the last image, you can see the scene structure, and I’ve highlighted the nodes to which I applied the theme. I also added all these types to the theme.

image

Found the issue, that button had the “flat” option checked.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.