Skip to content

Commit

Permalink
fixed #242: not set correct font when toast draw message
Browse files Browse the repository at this point in the history
  • Loading branch information
solosky committed Apr 7, 2024
1 parent 9d02de1 commit 198007d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fw/application/src/mui/view/mui_toast_view.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ static void mui_toast_timer_handler(void *p_context) {
static void mui_toast_view_on_draw(mui_view_t *p_view, mui_canvas_t *p_canvas) {
mui_toast_view_t *p_toast_view = (mui_toast_view_t *)p_view->user_data;
const char *msg = string_get_cstr(p_toast_view->message);
mui_canvas_set_font(p_canvas, u8g2_font_wqy12_t_gb2312a);
if (p_toast_view->is_visible && string_size(p_toast_view->message) > 0) {
uint8_t mw = mui_canvas_get_width(p_canvas) - 16;
uint8_t th = mui_element_text_height(p_canvas, mw, msg);
Expand Down

0 comments on commit 198007d

Please sign in to comment.