feat(nice!view): Custom widgets
This commit is contained in:
parent
f3110d1d1e
commit
18a2b76bf0
13 changed files with 986 additions and 19 deletions
28
app/boards/shields/nice_view/custom_status_screen.c
Normal file
28
app/boards/shields/nice_view/custom_status_screen.c
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
*
|
||||
* Copyright (c) 2023 The ZMK Contributors
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "widgets/status.h"
|
||||
|
||||
#include <zephyr/logging/log.h>
|
||||
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
||||
|
||||
#if IS_ENABLED(CONFIG_NICE_VIEW_WIDGET_STATUS)
|
||||
static struct zmk_widget_status status_widget;
|
||||
#endif
|
||||
|
||||
lv_obj_t *zmk_display_status_screen() {
|
||||
|
||||
lv_obj_t *screen;
|
||||
screen = lv_obj_create(NULL);
|
||||
|
||||
#if IS_ENABLED(CONFIG_NICE_VIEW_WIDGET_STATUS)
|
||||
zmk_widget_status_init(&status_widget, screen);
|
||||
lv_obj_align(zmk_widget_status_obj(&status_widget), LV_ALIGN_TOP_LEFT, 0, 0);
|
||||
#endif
|
||||
|
||||
return screen;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue