refactor(display): Saner font selection/defaults.

* Only select fonts for the default built in status screen
* Leverage theme default fonts, instead of hardcoding theme
  details in each component.
This commit is contained in:
Peter Johanson
2021-04-01 21:22:48 -04:00
committed by Pete Johanson
parent 2128b2b55f
commit 3e6a3758ed
7 changed files with 23 additions and 79 deletions

View File

@@ -48,6 +48,9 @@ lv_obj_t *zmk_display_status_screen() {
#if IS_ENABLED(CONFIG_ZMK_WIDGET_LAYER_STATUS)
zmk_widget_layer_status_init(&layer_status_widget, screen);
lv_obj_set_style_local_text_font(zmk_widget_layer_status_obj(&layer_status_widget),
LV_LABEL_PART_MAIN, LV_STATE_DEFAULT,
lv_theme_get_font_small());
lv_obj_align(zmk_widget_layer_status_obj(&layer_status_widget), NULL, LV_ALIGN_IN_BOTTOM_LEFT,
0, 0);
#endif