diff options
author | Kieran Cawthray <kieranc@gmail.com> | 2022-09-05 22:03:56 +0200 |
---|---|---|
committer | Kieran Cawthray <kieranc@gmail.com> | 2022-09-05 22:03:56 +0200 |
commit | 293340515812b15030b6497a3eed1b1b8fceadae (patch) | |
tree | a46c96953676a756723477a363a5eedafbbd3dd1 /src/displayapp/InfiniTimeTheme.h | |
parent | 593ca2028d77c013fa4026a7183b7f66f2cca5ba (diff) | |
parent | f53e75063b6ef618d65a1f287df52ba01c3351f5 (diff) |
Merge remote-tracking branch 'upstream/develop' into pts-options
Diffstat (limited to 'src/displayapp/InfiniTimeTheme.h')
-rw-r--r-- | src/displayapp/InfiniTimeTheme.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/displayapp/InfiniTimeTheme.h b/src/displayapp/InfiniTimeTheme.h new file mode 100644 index 00000000..5709b007 --- /dev/null +++ b/src/displayapp/InfiniTimeTheme.h @@ -0,0 +1,33 @@ +#pragma once + +#include <lvgl/lvgl.h> + +namespace Colors { + static constexpr lv_color_t orange = LV_COLOR_MAKE(0xff, 0xb0, 0x0); + static constexpr lv_color_t green = LV_COLOR_MAKE(0x0, 0xb0, 0x0); + static constexpr lv_color_t lightGray = LV_COLOR_MAKE(0xb0, 0xb0, 0xb0); + + static constexpr lv_color_t bg = LV_COLOR_MAKE(0x5d, 0x69, 0x7e); + static constexpr lv_color_t bgAlt = LV_COLOR_MAKE(0x38, 0x38, 0x38); + static constexpr lv_color_t bgDark = LV_COLOR_MAKE(0x18, 0x18, 0x18); + static constexpr lv_color_t highlight = green; +}; + +/** + * Initialize the default + * @param color_primary the primary color of the theme + * @param color_secondary the secondary color for the theme + * @param flags ORed flags starting with `LV_THEME_DEF_FLAG_...` + * @param font_small pointer to a small font + * @param font_normal pointer to a normal font + * @param font_subtitle pointer to a large font + * @param font_title pointer to a extra large font + * @return a pointer to reference this theme later + */ +lv_theme_t* lv_pinetime_theme_init(lv_color_t color_primary, + lv_color_t color_secondary, + uint32_t flags, + const lv_font_t* font_small, + const lv_font_t* font_normal, + const lv_font_t* font_subtitle, + const lv_font_t* font_title); |