diff --git a/app/include/zmk/display/widgets/label.h b/app/include/zmk/display/widgets/label.h index 371faeee..27156f2e 100644 --- a/app/include/zmk/display/widgets/label.h +++ b/app/include/zmk/display/widgets/label.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 The ZMK Contributors + * Copyright (c) 2024 The ZMK Contributors * * SPDX-License-Identifier: MIT */ diff --git a/app/src/display/widgets/Kconfig b/app/src/display/widgets/Kconfig index cd5ea1aa..cec589b9 100644 --- a/app/src/display/widgets/Kconfig +++ b/app/src/display/widgets/Kconfig @@ -41,7 +41,7 @@ config ZMK_WIDGET_LABEL select LV_USE_LABEL config ZMK_WIDGET_LABEL_TEXT - string "Custom message to display, up to 7 characters" + string "Custom message to display" default "ZMK" endmenu diff --git a/app/src/display/widgets/label.c b/app/src/display/widgets/label.c index 37ab9be5..87a5ea99 100644 --- a/app/src/display/widgets/label.c +++ b/app/src/display/widgets/label.c @@ -1,22 +1,14 @@ /* - * Copyright (c) 2020 The ZMK Contributors + * Copyright (c) 2024 The ZMK Contributors * * SPDX-License-Identifier: MIT */ #include -#include -LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); - #include #include -#define WIDGET_LABEL_TEXT_MAX 7 - -BUILD_ASSERT(sizeof(CONFIG_ZMK_WIDGET_LABEL_TEXT) - 1 <= WIDGET_LABEL_TEXT_MAX, - "ERROR: Widget label text length is too long. Max length: 7"); - int zmk_widget_label_init(struct zmk_widget_label *widget, lv_obj_t *parent) { widget->obj = lv_label_create(parent); lv_label_set_text(widget->obj, CONFIG_ZMK_WIDGET_LABEL_TEXT); diff --git a/docs/docs/config/displays.md b/docs/docs/config/displays.md index c834db39..b0bce013 100644 --- a/docs/docs/config/displays.md +++ b/docs/docs/config/displays.md @@ -24,7 +24,7 @@ Definition files: | `CONFIG_ZMK_WIDGET_OUTPUT_STATUS` | bool | Enable a widget to show the current output (USB/BLE) | y | | `CONFIG_ZMK_WIDGET_WPM_STATUS` | bool | Enable a widget to show words per minute | n | | `ZMK_WIDGET_LABEL` | bool | Enable a widget to display custom messages | n | -| `ZMK_WIDGET_LABEL_TEXT` | string | Custom message to display, up to 7 characters | ZMK | +| `ZMK_WIDGET_LABEL_TEXT` | string | Custom message to display | ZMK | Note that `CONFIG_ZMK_DISPLAY_INVERT` setting might not work as expected with custom status screens that utilize images.