From da987838f5a1b1e42208ffa4f8b6b4bfcd8d1e59 Mon Sep 17 00:00:00 2001 From: Thomas Peterson Date: Sat, 31 Jan 2026 11:12:53 +0100 Subject: [PATCH] Fixes --- main/widgets/Widget.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/main/widgets/Widget.cpp b/main/widgets/Widget.cpp index f573827..b5853c7 100644 --- a/main/widgets/Widget.cpp +++ b/main/widgets/Widget.cpp @@ -73,8 +73,7 @@ void Widget::applyCommonStyle() { } void Widget::applyShadowStyle() { - return; - if (obj_ == nullptr || !config_.shadow.enabled) return; + if (obj_ == nullptr || !config_.shadow.enabled || config_.type == WidgetType::BUTTON) return; // Limit shadow values to prevent memory issues on ESP32 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_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) {