mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-10 12:47:51 +08:00
fix(opa): corrected incorrect usage of LV_OPA_MIN (#8161)
Signed-off-by: yushuailong1 <yushuailong1@xiaomi.com>
This commit is contained in:
@@ -799,7 +799,7 @@ static void spectrum_draw_event_cb(lv_event_t * e)
|
||||
lv_layer_t * layer = lv_event_get_layer(e);
|
||||
|
||||
lv_opa_t opa = lv_obj_get_style_opa_recursive(obj, LV_PART_MAIN);
|
||||
if(opa < LV_OPA_MIN) return;
|
||||
if(opa <= LV_OPA_MIN) return;
|
||||
|
||||
lv_point_t center;
|
||||
lv_area_t obj_coords;
|
||||
|
||||
@@ -520,8 +520,8 @@ void lv_obj_get_scrollbar_area(lv_obj_t * obj, lv_area_t * hor_area, lv_area_t *
|
||||
int32_t hor_req_space = hor_draw ? thickness : 0;
|
||||
int32_t rem;
|
||||
|
||||
if(lv_obj_get_style_bg_opa(obj, LV_PART_SCROLLBAR) < LV_OPA_MIN &&
|
||||
lv_obj_get_style_border_opa(obj, LV_PART_SCROLLBAR) < LV_OPA_MIN) {
|
||||
if(lv_obj_get_style_bg_opa(obj, LV_PART_SCROLLBAR) <= LV_OPA_MIN &&
|
||||
lv_obj_get_style_border_opa(obj, LV_PART_SCROLLBAR) <= LV_OPA_MIN) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1141,7 +1141,7 @@ static void refr_obj(lv_layer_t * layer, lv_obj_t * obj)
|
||||
|
||||
/*If `opa_layered != LV_OPA_COVER` draw the widget on a new layer and blend that layer with the given opacity.*/
|
||||
const lv_opa_t opa_layered = lv_obj_get_style_opa_layered(obj, LV_PART_MAIN);
|
||||
if(opa_layered < LV_OPA_MIN) return;
|
||||
if(opa_layered <= LV_OPA_MIN) return;
|
||||
|
||||
const lv_opa_t layer_opa_ori = layer->opa;
|
||||
const lv_color32_t layer_recolor = layer->recolor;
|
||||
|
||||
+2
-2
@@ -53,8 +53,8 @@ enum {
|
||||
LV_OPA_COVER = 255,
|
||||
};
|
||||
|
||||
#define LV_OPA_MIN 2 /**< Opacities below this will be transparent */
|
||||
#define LV_OPA_MAX 253 /**< Opacities above this will fully cover */
|
||||
#define LV_OPA_MIN 2 /**< Fully transparent if opa <= LV_OPA_MIN */
|
||||
#define LV_OPA_MAX 253 /**< Fully cover if opa >= LV_OPA_MAX */
|
||||
|
||||
/**
|
||||
* Get the pixel size of a color format in bits, bpp
|
||||
|
||||
Reference in New Issue
Block a user