From a65ca267bf9e4a55d6a303aee17cfbe22d464f2b Mon Sep 17 00:00:00 2001 From: _VIFEXTech Date: Thu, 23 Nov 2023 15:44:12 +0800 Subject: [PATCH] fix(example): fix gradient has no effect (#4850) Signed-off-by: pengyiqiang Co-authored-by: pengyiqiang --- examples/styles/lv_example_style_2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/styles/lv_example_style_2.c b/examples/styles/lv_example_style_2.c index 540d681b8c..8376e5f174 100644 --- a/examples/styles/lv_example_style_2.c +++ b/examples/styles/lv_example_style_2.c @@ -16,7 +16,9 @@ void lv_example_style_2(void) grad.dir = LV_GRAD_DIR_VER; grad.stops_count = 2; grad.stops[0].color = lv_palette_lighten(LV_PALETTE_GREY, 1); + grad.stops[0].opa = LV_OPA_COVER; grad.stops[1].color = lv_palette_main(LV_PALETTE_BLUE); + grad.stops[1].opa = LV_OPA_COVER; /*Shift the gradient to the bottom*/ grad.stops[0].frac = 128;