How to eliminate the light grey shade in the bottom of a built-in button widget?

Important: unclear posts may not receive useful answers.

Before posting

  • Get familiar with Markdown to format and structure your post
  • Be sure to update lvgl from the latest version from the master branch.
  • Be sure you have checked the relevant part of the documentation.
  • If applicable use the Simulator to eliminate hardware related issues.

Delete this section if you read and applied the mentioned points.


It has a light grey shade in the bottom of a built-in widget, how to set a style to eliminate it?

What MCU/Processor/Board and compiler are you using?

What LVGL version are you using?


What do you want to achieve?

What have you tried so far?

Code to reproduce

Add a code snippet which can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.

The code block(s) should be formatted like:

/*You code here*/

Screenshot and/or video

If possible, add screenshots and/or videos about the current state.

I’ve used lv_style_set_shadow_width.

    lv_style_set_shadow_width(&softkeyButtonEnabledStyle, 0);

Maybe there are other ways.

It should work.

Do you think there should an option in lv_conf.h to disable it?

I think that by default the button widget shouldn’t have a shadow enabled. It wasn’t there in version 7 and when I switched over to version 8, I had to make this change to all of my buttons. But that’s just an opinion, humble as it may be.

I think it will be better for lvgl to support basic widgets without complex style. And an option is necessary, because in a large project, we may create a lot of widgets, in this case, we will modify lots of codes everytime when we update the version of lvgl to the latest one.
In my opinion, v8 version is more difficult and complex than v6 version. Of course, it seems affected by the adjustment of the API to some degree.