From 57bd6615045124f3077728df485780931ba98d6c Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Sun, 31 Mar 2024 21:05:02 +0200 Subject: [PATCH] Unbreak styling of message box label --- CHANGELOG.md | 2 +- shared/theme.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f3807f..cec4697 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,7 @@ If a change only affects particular applications, they are listed in parentheses - feat(buffyboard): Allow disabling input devices via config - feat(buffyboard): Add CLI flags for overriding geometry & DPI - fix(unl0kr): Shutdown message box doesn't close on decline -- fix(unl0kr): Shutdown message box buttons are unstyled +- fix(unl0kr): Shutdown message box buttons and label are unstyled - fix(unl0kr): Build fails when DRM is disabled - misc: Update lvgl to git master (2023-03-30) diff --git a/shared/theme.c b/shared/theme.c index db9c8c1..12d9fb5 100644 --- a/shared/theme.c +++ b/shared/theme.c @@ -285,8 +285,11 @@ static void apply_theme_cb(lv_theme_t *theme, lv_obj_t *obj) { return; } - if (lv_obj_check_type(obj, &lv_label_class) && (lv_obj_check_type(lv_obj_get_parent(obj), &lv_msgbox_class) || lv_obj_check_type(lv_obj_get_parent(obj), &lv_msgbox_content_class))) { - lv_obj_add_style(obj, &(styles.msgbox_label), 0); + if (lv_obj_check_type(obj, &lv_label_class) && + (lv_obj_check_type(lv_obj_get_parent(obj), &lv_msgbox_class) + || lv_obj_check_type(lv_obj_get_parent(obj), &lv_msgbox_header_class) + || lv_obj_check_type(lv_obj_get_parent(obj), &lv_msgbox_content_class))) + { return; /* Inherit styling from message box */ }