How to change disabled background color for button

What do you want to achieve?

I want to set the disabled background color of a button to match the background color of the default state.

What have you tried so far?

Changed background color for disabled state.

Screenshot or video

Others

  • SquareLine Studio version: v1.3.4
  • Operating system: Windows 11
  • Target hardware: ESP32

In LVGL the default state’s background colour is inherited by disabled state as well if it’s not set explicitly. But in Light/Dark LVGL themes the background color of disabled state is already set to a colour, that’s why that colour is appearing for your disabled state if you don’t set the background color.
If you select ‘Simplified’ theme when you create the project, that built-in LVGL setting is not activated so you get the same background colour for the disabled state of the button if you don’t override it.

If you already build upon the Light/Dark theme, you need to redefine the background for those states set by LVGL theme. Still, it would be less redundant if you used a global color made in the default theme, so the color would be specified in only a single place, and reused in both default and disabled states.