From 56e55c99f151b3732a8f69f88f013e450d0d5101 Mon Sep 17 00:00:00 2001 From: Chris Opperwall Date: Thu, 30 Oct 2025 22:42:11 -0700 Subject: [PATCH] Replace 0 literal with LV_PART_MAIN This fixes a build failure when compiling the project with platfromio. LV_PART_MAIN has the same value, but it satisfies the type issue where `lv_obj_get_style_pad_top` and `lv_obj_get_style_pad_bottom` expect their second arguments to be an `lv_part_t` enum. --- src/ui/QuestionCard.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/QuestionCard.cpp b/src/ui/QuestionCard.cpp index dfaee08..e27214d 100644 --- a/src/ui/QuestionCard.cpp +++ b/src/ui/QuestionCard.cpp @@ -164,8 +164,8 @@ void QuestionCard::startScrolling() lv_coord_t cont_h = lv_obj_get_height(_cont); /* include vertical padding */ - lv_coord_t pad_top = lv_obj_get_style_pad_top (_cont, 0); - lv_coord_t pad_bottom = lv_obj_get_style_pad_bottom(_cont, 0); + lv_coord_t pad_top = lv_obj_get_style_pad_top (_cont, LV_PART_MAIN); + lv_coord_t pad_bottom = lv_obj_get_style_pad_bottom(_cont, LV_PART_MAIN); lv_coord_t distance = label_h + pad_top + pad_bottom - cont_h; if (distance <= 0) return; // no scrolling needed