Skip to content

Commit

Permalink
Add some emojis to notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
ldab committed Aug 6, 2024
1 parent f7347e1 commit ac135bf
Show file tree
Hide file tree
Showing 3 changed files with 1,614 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
#include "../notification_ui.h"
#include "ui/zsw_ui.h"

LV_FONT_DECLARE(lv_font_montserrat_14_full)
// include emojis and it will fallback to lv_font_montserrat_14_full
LV_FONT_DECLARE(noto_emoji_14_light)

static on_notification_remove_cb_t notification_removed_callback;
static lv_obj_t *main_page;
Expand Down Expand Up @@ -187,7 +188,8 @@ static void build_notification_entry(lv_obj_t *parent, zsw_not_mngr_notification
LV_OBJ_FLAG_SCROLL_CHAIN);
lv_obj_set_style_text_color(ui_LabelHeader, lv_color_hex(0x587BF8), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_LabelHeader, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_LabelHeader, &lv_font_montserrat_14_full, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_LabelHeader, &noto_emoji_14_light,
LV_PART_MAIN | LV_STATE_DEFAULT);

ui_LabelBody = lv_label_create(ui_Panel);
lv_obj_set_width(ui_LabelBody, 180);
Expand All @@ -202,7 +204,8 @@ static void build_notification_entry(lv_obj_t *parent, zsw_not_mngr_notification
LV_OBJ_FLAG_SCROLL_CHAIN);
lv_obj_set_style_text_color(ui_LabelBody, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_LabelBody, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_LabelBody, &lv_font_montserrat_14_full, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_LabelBody, &noto_emoji_14_light,
LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(ui_LabelBody, zsw_color_gray(), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_bg_opa(ui_LabelBody, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_border_color(ui_LabelBody, zsw_color_gray(), LV_PART_MAIN | LV_STATE_DEFAULT);
Expand Down Expand Up @@ -238,7 +241,7 @@ void notifications_ui_page_create(lv_obj_t *parent, lv_group_t *group)

empty_label = lv_label_create(parent);
lv_label_set_text(empty_label, "No notifications");
lv_obj_set_style_text_font(empty_label, &lv_font_montserrat_14_full, 0);
lv_obj_set_style_text_font(empty_label, &noto_emoji_14_light, 0);
lv_obj_set_style_text_color(empty_label, lv_color_hex(0x8C8C8C), 0);
lv_obj_center(empty_label);

Expand Down
Loading

0 comments on commit ac135bf

Please sign in to comment.