Fixes
This commit is contained in:
parent
96a32acc6e
commit
da987838f5
@ -73,8 +73,7 @@ void Widget::applyCommonStyle() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Widget::applyShadowStyle() {
|
void Widget::applyShadowStyle() {
|
||||||
return;
|
if (obj_ == nullptr || !config_.shadow.enabled || config_.type == WidgetType::BUTTON) return;
|
||||||
if (obj_ == nullptr || !config_.shadow.enabled) return;
|
|
||||||
|
|
||||||
// Limit shadow values to prevent memory issues on ESP32
|
// Limit shadow values to prevent memory issues on ESP32
|
||||||
constexpr int16_t MAX_SHADOW_BLUR = 15;
|
constexpr int16_t MAX_SHADOW_BLUR = 15;
|
||||||
@ -100,13 +99,6 @@ void Widget::applyShadowStyle() {
|
|||||||
lv_obj_set_style_shadow_offset_x(obj_, config_.shadow.offsetX, 0);
|
lv_obj_set_style_shadow_offset_x(obj_, config_.shadow.offsetX, 0);
|
||||||
lv_obj_set_style_shadow_offset_y(obj_, config_.shadow.offsetY, 0);
|
lv_obj_set_style_shadow_offset_y(obj_, config_.shadow.offsetY, 0);
|
||||||
|
|
||||||
// For clickable widgets: explicitly define PRESSED state with no shadow
|
|
||||||
// This prevents PPA/DMA2D freeze when shadow needs recalculation during state change
|
|
||||||
if (lv_obj_has_flag(obj_, LV_OBJ_FLAG_CLICKABLE)) {
|
|
||||||
lv_obj_set_style_shadow_width(obj_, 0, LV_STATE_PRESSED);
|
|
||||||
lv_obj_set_style_shadow_spread(obj_, 0, LV_STATE_PRESSED);
|
|
||||||
lv_obj_set_style_shadow_opa(obj_, 0, LV_STATE_PRESSED);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const lv_font_t* Widget::getFontBySize(uint8_t sizeIndex) {
|
const lv_font_t* Widget::getFontBySize(uint8_t sizeIndex) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user