diff --git a/app/include/zmk/display/widgets/mods_status.h b/app/include/zmk/display/widgets/mods_status.h index 411b379a..3850e324 100644 --- a/app/include/zmk/display/widgets/mods_status.h +++ b/app/include/zmk/display/widgets/mods_status.h @@ -7,7 +7,7 @@ #pragma once #include -#include +#include struct zmk_widget_mods_status { sys_snode_t node; diff --git a/app/src/display/status_screen.c b/app/src/display/status_screen.c index e107bafd..83d35df6 100644 --- a/app/src/display/status_screen.c +++ b/app/src/display/status_screen.c @@ -73,11 +73,9 @@ lv_obj_t *zmk_display_status_screen() { #if IS_ENABLED(CONFIG_ZMK_WIDGET_MODS_STATUS) zmk_widget_mods_status_init(&mods_status_widget, screen); - lv_obj_set_style_local_text_font(zmk_widget_mods_status_obj(&mods_status_widget), - LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, - lv_theme_get_font_small()); - lv_obj_align(zmk_widget_mods_status_obj(&mods_status_widget), NULL, LV_ALIGN_IN_BOTTOM_RIGHT, 0, - 0); + lv_obj_set_style_text_font(zmk_widget_mods_status_obj(&mods_status_widget), + lv_theme_get_font_small(screen), LV_PART_MAIN); + lv_obj_align(zmk_widget_mods_status_obj(&mods_status_widget), LV_ALIGN_BOTTOM_RIGHT, 0, 0); #endif return screen; } diff --git a/app/src/display/widgets/mods_status.c b/app/src/display/widgets/mods_status.c index 3086bc71..a963f7b4 100644 --- a/app/src/display/widgets/mods_status.c +++ b/app/src/display/widgets/mods_status.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -#include +#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); #include @@ -38,7 +38,7 @@ void set_mods_symbol(lv_obj_t *label, struct mods_status_state state) { strcat(text, "G"); lv_label_set_text(label, text); - lv_obj_align(label, NULL, LV_ALIGN_IN_BOTTOM_RIGHT, -1, 0); + lv_obj_align(label, LV_ALIGN_BOTTOM_RIGHT, -1, 0); } void mods_status_update_cb(struct mods_status_state state) { @@ -51,10 +51,8 @@ ZMK_DISPLAY_WIDGET_LISTENER(widget_mods_status, struct mods_status_state, mods_s ZMK_SUBSCRIPTION(widget_mods_status, zmk_keycode_state_changed); int zmk_widget_mods_status_init(struct zmk_widget_mods_status *widget, lv_obj_t *parent) { - widget->obj = lv_label_create(parent, NULL); - lv_label_set_align(widget->obj, LV_LABEL_ALIGN_RIGHT); - - lv_obj_set_size(widget->obj, 40, 15); + widget->obj = lv_label_create(parent); + lv_obj_set_style_text_align(widget->obj, LV_TEXT_ALIGN_RIGHT, 0); sys_slist_append(&widgets, &widget->node);