Unbreak styling of message box label

This commit is contained in:
Johannes Marbach 2024-03-31 21:05:02 +02:00
parent 1048c76aa3
commit 57bd661504
2 changed files with 6 additions and 3 deletions

View file

@ -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 */
}