replace roboto font with montserrat and add built-in fonts for every 2px from 12-32px
This commit is contained in:
@@ -315,16 +315,23 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in the i
|
||||
* To create a new font go to: https://littlevgl.com/ttf-font-to-c-array
|
||||
*/
|
||||
|
||||
/* Robot fonts with bpp = 4
|
||||
* https://fonts.google.com/specimen/Roboto */
|
||||
#define LV_FONT_ROBOTO_12 0
|
||||
#define LV_FONT_ROBOTO_16 1
|
||||
#define LV_FONT_ROBOTO_22 0
|
||||
#define LV_FONT_ROBOTO_28 0
|
||||
/* Montserrat fonts with bpp = 4
|
||||
* https://fonts.google.com/specimen/Montserrat */
|
||||
#define LV_FONT_MONTSERRAT_12 0
|
||||
#define LV_FONT_MONTSERRAT_14 0
|
||||
#define LV_FONT_MONTSERRAT_16 1
|
||||
#define LV_FONT_MONTSERRAT_18 0
|
||||
#define LV_FONT_MONTSERRAT_20 0
|
||||
#define LV_FONT_MONTSERRAT_22 0
|
||||
#define LV_FONT_MONTSERRAT_24 0
|
||||
#define LV_FONT_MONTSERRAT_26 0
|
||||
#define LV_FONT_MONTSERRAT_28 0
|
||||
#define LV_FONT_MONTSERRAT_30 0
|
||||
#define LV_FONT_MONTSERRAT_32 0
|
||||
|
||||
/* Demonstrate special features */
|
||||
#define LV_FONT_ROBOTO_12_SUBPX 1
|
||||
#define LV_FONT_ROBOTO_28_COMPRESSED 1 /*bpp = 3*/
|
||||
#define LV_FONT_MONTSERRAT_12_SUBPX 0
|
||||
#define LV_FONT_MONTSERRAT_28_COMPRESSED 0 /*bpp = 3*/
|
||||
|
||||
/*Pixel perfect monospace font
|
||||
* http://pelulamu.net/unscii/ */
|
||||
@@ -365,10 +372,10 @@ typedef void * lv_font_user_data_t;
|
||||
#define LV_THEME_DEFAULT_COLOR_PRIMARY LV_COLOR_RED
|
||||
#define LV_THEME_DEFAULT_COLOR_SECONDARY LV_COLOR_BLUE
|
||||
#define LV_THEME_DEFAULT_FLAG LV_THEME_MATERIAL_FLAG_LIGHT
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL &lv_font_roboto_16
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_roboto_16
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_roboto_16
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE &lv_font_roboto_16
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_16
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_16
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_16
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_16
|
||||
|
||||
/*=================
|
||||
* Text settings
|
||||
|
||||
BIN
scripts/built_in_font/Montserrat-Medium.ttf
Normal file
BIN
scripts/built_in_font/Montserrat-Medium.ttf
Normal file
Binary file not shown.
BIN
scripts/built_in_font/Montserrat-Regular.ttf
Normal file
BIN
scripts/built_in_font/Montserrat-Regular.ttf
Normal file
Binary file not shown.
@@ -23,7 +23,7 @@ parser.add_argument('-r', '--range',
|
||||
parser.add_argument('--font',
|
||||
metavar = 'file',
|
||||
nargs='?',
|
||||
default='Roboto-Regular.woff',
|
||||
default='Montserrat-Medium.ttf',
|
||||
help='A TTF or WOFF file')
|
||||
parser.add_argument('-o', '--output',
|
||||
nargs='?',
|
||||
@@ -45,5 +45,5 @@ else:
|
||||
syms = "61441,61448,61451,61452,61452,61453,61457,61459,61461,61465,61468,61473,61478,61479,61480,61502,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61550,61552,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61671,61674,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62087,62099,62212,62189,62810,63426,63650"
|
||||
|
||||
#Run the command (Add degree and bbullet symbol)
|
||||
cmd = "lv_font_conv {} --bpp {} --size {} --font Roboto-Regular.woff -r {} --font FontAwesome5-Solid+Brands+Regular.woff -r {} --format lvgl -o {} --force-fast-kern-format".format(compr, args.bpp, args.size, args.range[0], syms, args.output)
|
||||
cmd = "lv_font_conv {} --bpp {} --size {} --font Montserrat-Medium.ttf -r {} --font FontAwesome5-Solid+Brands+Regular.woff -r {} --format lvgl -o {} --force-fast-kern-format".format(compr, args.bpp, args.size, args.range[0], syms, args.output)
|
||||
os.system(cmd)
|
||||
|
||||
@@ -1,26 +1,54 @@
|
||||
import os
|
||||
|
||||
print("Generating 12 px")
|
||||
os.system("python built_in_font_gen.py --size 12 -o lv_font_roboto_12.c --bpp 4")
|
||||
os.system('sed -i \'s|#include "lvgl/lvgl.h"|#include "../../lvgl.h"|\' lv_font_roboto_12.c')
|
||||
os.system("python built_in_font_gen.py --size 12 -o lv_font_montserrat_12.c --bpp 4")
|
||||
os.system('sed -i \'s|#include "lvgl/lvgl.h"|#include "../../lvgl.h"|\' lv_font_montserrat_12.c')
|
||||
|
||||
print("\nGenerating 14 px")
|
||||
os.system("python built_in_font_gen.py --size 14 -o lv_font_montserrat_14.c --bpp 4")
|
||||
os.system('sed -i \'s|#include "lvgl/lvgl.h"|#include "../../lvgl.h"|\' lv_font_montserrat_14.c')
|
||||
|
||||
print("\nGenerating 16 px")
|
||||
os.system("python built_in_font_gen.py --size 16 -o lv_font_roboto_16.c --bpp 4")
|
||||
os.system('sed -i \'s|#include "lvgl/lvgl.h"|#include "../../lvgl.h"|\' lv_font_roboto_16.c')
|
||||
os.system("python built_in_font_gen.py --size 16 -o lv_font_montserrat_16.c --bpp 4")
|
||||
os.system('sed -i \'s|#include "lvgl/lvgl.h"|#include "../../lvgl.h"|\' lv_font_montserrat_16.c')
|
||||
|
||||
print("\nGenerating 18 px")
|
||||
os.system("python built_in_font_gen.py --size 18 -o lv_font_montserrat_18.c --bpp 4")
|
||||
os.system('sed -i \'s|#include "lvgl/lvgl.h"|#include "../../lvgl.h"|\' lv_font_montserrat_18.c')
|
||||
|
||||
print("\nGenerating 20 px")
|
||||
os.system("python built_in_font_gen.py --size 20 -o lv_font_montserrat_20.c --bpp 4")
|
||||
os.system('sed -i \'s|#include "lvgl/lvgl.h"|#include "../../lvgl.h"|\' lv_font_montserrat_20.c')
|
||||
|
||||
print("\nGenerating 22 px")
|
||||
os.system("python built_in_font_gen.py --size 22 -o lv_font_roboto_22.c --bpp 4")
|
||||
os.system('sed -i \'s|#include "lvgl/lvgl.h"|#include "../../lvgl.h"|\' lv_font_roboto_22.c')
|
||||
os.system("python built_in_font_gen.py --size 22 -o lv_font_montserrat_22.c --bpp 4")
|
||||
os.system('sed -i \'s|#include "lvgl/lvgl.h"|#include "../../lvgl.h"|\' lv_font_montserrat_22.c')
|
||||
|
||||
print("\nGenerating 24 px")
|
||||
os.system("python built_in_font_gen.py --size 24 -o lv_font_montserrat_24.c --bpp 4")
|
||||
os.system('sed -i \'s|#include "lvgl/lvgl.h"|#include "../../lvgl.h"|\' lv_font_montserrat_24.c')
|
||||
|
||||
print("\nGenerating 26 px")
|
||||
os.system("python built_in_font_gen.py --size 26 -o lv_font_montserrat_26.c --bpp 4")
|
||||
os.system('sed -i \'s|#include "lvgl/lvgl.h"|#include "../../lvgl.h"|\' lv_font_montserrat_26.c')
|
||||
|
||||
print("\nGenerating 28 px")
|
||||
os.system("python built_in_font_gen.py --size 28 -o lv_font_roboto_28.c --bpp 4")
|
||||
os.system('sed -i \'s|#include "lvgl/lvgl.h"|#include "../../lvgl.h"|\' lv_font_roboto_28.c')
|
||||
os.system("python built_in_font_gen.py --size 28 -o lv_font_montserrat_28.c --bpp 4")
|
||||
os.system('sed -i \'s|#include "lvgl/lvgl.h"|#include "../../lvgl.h"|\' lv_font_montserrat_28.c')
|
||||
|
||||
print("\nGenerating 30 px")
|
||||
os.system("python built_in_font_gen.py --size 30 -o lv_font_montserrat_30.c --bpp 4")
|
||||
os.system('sed -i \'s|#include "lvgl/lvgl.h"|#include "../../lvgl.h"|\' lv_font_montserrat_30.c')
|
||||
|
||||
print("\nGenerating 32 px")
|
||||
os.system("python built_in_font_gen.py --size 32 -o lv_font_montserrat_32.c --bpp 4")
|
||||
os.system('sed -i \'s|#include "lvgl/lvgl.h"|#include "../../lvgl.h"|\' lv_font_montserrat_32.c')
|
||||
|
||||
print("\nGenerating 12 px subpx")
|
||||
os.system("python built_in_font_gen.py --size 12 -o lv_font_roboto_12_subpx.c --bpp 4 --subpx")
|
||||
os.system('sed -i \'s|#include "lvgl/lvgl.h"|#include "../../lvgl.h"|\' lv_font_roboto_12_subpx.c')
|
||||
os.system("python built_in_font_gen.py --size 12 -o lv_font_montserrat_12_subpx.c --bpp 4 --subpx")
|
||||
os.system('sed -i \'s|#include "lvgl/lvgl.h"|#include "../../lvgl.h"|\' lv_font_montserrat_12_subpx.c')
|
||||
|
||||
print("\nGenerating 28 px compressed")
|
||||
os.system("python built_in_font_gen.py --size 28 -o lv_font_roboto_28_compressed.c --bpp 4 --compressed")
|
||||
os.system('sed -i \'s|#include "lvgl/lvgl.h"|#include "../../lvgl.h"|\' lv_font_roboto_28_compressed.c')
|
||||
os.system("python built_in_font_gen.py --size 28 -o lv_font_montserrat_28_compressed.c --bpp 4 --compressed")
|
||||
os.system('sed -i \'s|#include "lvgl/lvgl.h"|#include "../../lvgl.h"|\' lv_font_montserrat_28_compressed.c')
|
||||
|
||||
|
||||
@@ -783,7 +783,7 @@
|
||||
#endif
|
||||
#if LV_USE_LED
|
||||
#ifndef LV_LED_BRIGHT_MIN
|
||||
# define LV_LED_BRIGHT_MIN 80 /*Minimal brightness*/
|
||||
# define LV_LED_BRIGHT_MIN 120 /*Minimal brightness*/
|
||||
#endif
|
||||
#ifndef LV_LED_BRIGHT_MAX
|
||||
# define LV_LED_BRIGHT_MAX 255 /*Maximal brightness*/
|
||||
|
||||
@@ -127,20 +127,56 @@ static inline lv_coord_t lv_font_get_line_height(const lv_font_t * font_p)
|
||||
|
||||
#define LV_FONT_DECLARE(font_name) extern lv_font_t font_name;
|
||||
|
||||
#if LV_FONT_ROBOTO_12
|
||||
LV_FONT_DECLARE(lv_font_roboto_12)
|
||||
#if LV_FONT_MONTSERRAT_12
|
||||
LV_FONT_DECLARE(lv_font_montserrat_12)
|
||||
#endif
|
||||
|
||||
#if LV_FONT_ROBOTO_16
|
||||
LV_FONT_DECLARE(lv_font_roboto_16)
|
||||
#if LV_FONT_MONTSERRAT_14
|
||||
LV_FONT_DECLARE(lv_font_montserrat_14)
|
||||
#endif
|
||||
|
||||
#if LV_FONT_ROBOTO_22
|
||||
LV_FONT_DECLARE(lv_font_roboto_22)
|
||||
#if LV_FONT_MONTSERRAT_16
|
||||
LV_FONT_DECLARE(lv_font_montserrat_16)
|
||||
#endif
|
||||
|
||||
#if LV_FONT_ROBOTO_28
|
||||
LV_FONT_DECLARE(lv_font_roboto_28)
|
||||
#if LV_FONT_MONTSERRAT_18
|
||||
LV_FONT_DECLARE(lv_font_montserrat_18)
|
||||
#endif
|
||||
|
||||
#if LV_FONT_MONTSERRAT_20
|
||||
LV_FONT_DECLARE(lv_font_montserrat_20)
|
||||
#endif
|
||||
|
||||
#if LV_FONT_MONTSERRAT_22
|
||||
LV_FONT_DECLARE(lv_font_montserrat_22)
|
||||
#endif
|
||||
|
||||
#if LV_FONT_MONTSERRAT_24
|
||||
LV_FONT_DECLARE(lv_font_montserrat_24)
|
||||
#endif
|
||||
|
||||
#if LV_FONT_MONTSERRAT_26
|
||||
LV_FONT_DECLARE(lv_font_montserrat_26)
|
||||
#endif
|
||||
|
||||
#if LV_FONT_MONTSERRAT_28
|
||||
LV_FONT_DECLARE(lv_font_montserrat_28)
|
||||
#endif
|
||||
|
||||
#if LV_FONT_MONTSERRAT_30
|
||||
LV_FONT_DECLARE(lv_font_montserrat_30)
|
||||
#endif
|
||||
|
||||
#if LV_FONT_MONTSERRAT_32
|
||||
LV_FONT_DECLARE(lv_font_montserrat_32)
|
||||
#endif
|
||||
|
||||
#if LV_FONT_MONTSERRAT_28_COMPRESSED
|
||||
LV_FONT_DECLARE(lv_font_montserrat_28_compressed)
|
||||
#endif
|
||||
|
||||
#if LV_FONT_MONTSERRAT_12_SUBPX
|
||||
LV_FONT_DECLARE(lv_font_montserrat_12_subpx)
|
||||
#endif
|
||||
|
||||
#if LV_FONT_UNSCII_8
|
||||
|
||||
1875
src/lv_font/lv_font_montserrat_12.c
Normal file
1875
src/lv_font/lv_font_montserrat_12.c
Normal file
File diff suppressed because it is too large
Load Diff
1875
src/lv_font/lv_font_montserrat_12_subpx.c
Normal file
1875
src/lv_font/lv_font_montserrat_12_subpx.c
Normal file
File diff suppressed because it is too large
Load Diff
2144
src/lv_font/lv_font_montserrat_14.c
Normal file
2144
src/lv_font/lv_font_montserrat_14.c
Normal file
File diff suppressed because it is too large
Load Diff
2407
src/lv_font/lv_font_montserrat_16.c
Normal file
2407
src/lv_font/lv_font_montserrat_16.c
Normal file
File diff suppressed because it is too large
Load Diff
2796
src/lv_font/lv_font_montserrat_18.c
Normal file
2796
src/lv_font/lv_font_montserrat_18.c
Normal file
File diff suppressed because it is too large
Load Diff
3142
src/lv_font/lv_font_montserrat_20.c
Normal file
3142
src/lv_font/lv_font_montserrat_20.c
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
3960
src/lv_font/lv_font_montserrat_24.c
Normal file
3960
src/lv_font/lv_font_montserrat_24.c
Normal file
File diff suppressed because it is too large
Load Diff
4480
src/lv_font/lv_font_montserrat_26.c
Normal file
4480
src/lv_font/lv_font_montserrat_26.c
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
3204
src/lv_font/lv_font_montserrat_28_compressed.c
Normal file
3204
src/lv_font/lv_font_montserrat_28_compressed.c
Normal file
File diff suppressed because it is too large
Load Diff
5580
src/lv_font/lv_font_montserrat_30.c
Normal file
5580
src/lv_font/lv_font_montserrat_30.c
Normal file
File diff suppressed because it is too large
Load Diff
6057
src/lv_font/lv_font_montserrat_32.c
Normal file
6057
src/lv_font/lv_font_montserrat_32.c
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -136,6 +136,10 @@ static lv_style_t pad_small;
|
||||
static lv_style_t list_bg, list_btn;
|
||||
#endif
|
||||
|
||||
#if LV_USE_MSGBOX
|
||||
static lv_style_t mbox_bg;
|
||||
#endif
|
||||
|
||||
#if LV_USE_PAGE
|
||||
static lv_style_t sb;
|
||||
#endif
|
||||
@@ -495,7 +499,7 @@ static void chart_init(void)
|
||||
lv_style_init(&chart_series);
|
||||
lv_style_set_line_width(&chart_series, LV_STATE_DEFAULT, LV_DPI / 50);
|
||||
lv_style_set_size(&chart_series, LV_STATE_DEFAULT, LV_DPI / 40);
|
||||
lv_style_set_pad_inner(&chart_series, LV_STATE_DEFAULT, 2); /*Space between columns*/
|
||||
lv_style_set_pad_inner(&chart_series, LV_STATE_DEFAULT, LV_MATH_MAX(LV_DPI / 100, 1)); /*Space between columns*/
|
||||
lv_style_set_radius(&chart_series, LV_STATE_DEFAULT, 1);
|
||||
|
||||
#endif
|
||||
@@ -531,7 +535,7 @@ static void calendar_init(void)
|
||||
lv_style_set_border_width(&calendar_date_nums, LV_STATE_CHECKED, 2);
|
||||
lv_style_set_border_side(&calendar_date_nums, LV_STATE_CHECKED, LV_BORDER_SIDE_LEFT);
|
||||
lv_style_set_border_color(&calendar_date_nums, LV_STATE_CHECKED, theme.color_primary);
|
||||
lv_style_set_pad_inner(&calendar_date_nums, LV_STATE_DEFAULT, LV_DPI / 40);
|
||||
lv_style_set_pad_inner(&calendar_date_nums, LV_STATE_DEFAULT, LV_MATH_MAX(LV_DPI / 50, 1));
|
||||
lv_style_set_pad_left(&calendar_date_nums, LV_STATE_DEFAULT, LV_DPI / 9);
|
||||
lv_style_set_pad_right(&calendar_date_nums, LV_STATE_DEFAULT, LV_DPI / 9);
|
||||
lv_style_set_pad_bottom(&calendar_date_nums, LV_STATE_DEFAULT, LV_DPI / 9);
|
||||
@@ -609,6 +613,9 @@ static void keyboard_init(void)
|
||||
static void msgbox_init(void)
|
||||
{
|
||||
#if LV_USE_MSGBOX
|
||||
lv_style_init(&mbox_bg);
|
||||
lv_style_set_shadow_width(&mbox_bg, LV_STATE_DEFAULT, LV_DPI / 4);
|
||||
lv_style_set_shadow_color(&mbox_bg, LV_STATE_DEFAULT, LV_COLOR_SILVER);
|
||||
|
||||
#endif
|
||||
}
|
||||
@@ -618,11 +625,11 @@ static void page_init(void)
|
||||
#if LV_USE_PAGE
|
||||
lv_style_init(&sb);
|
||||
lv_style_set_bg_opa(&sb, LV_STATE_DEFAULT, LV_OPA_COVER);
|
||||
lv_style_set_bg_color(&sb, LV_STATE_DEFAULT, COLOR_BG_BORDER);
|
||||
lv_style_set_bg_color(&sb, LV_STATE_DEFAULT, (IS_LIGHT ? lv_color_hex(0xcccfd1) : lv_color_hex(0x505559)));
|
||||
lv_style_set_radius(&sb, LV_STATE_DEFAULT, LV_RADIUS_CIRCLE);
|
||||
lv_style_set_size(&sb, LV_STATE_DEFAULT, LV_DPI / 30);
|
||||
lv_style_set_pad_right(&sb, LV_STATE_DEFAULT, LV_DPI / 20);
|
||||
lv_style_set_pad_bottom(&sb, LV_STATE_DEFAULT, LV_DPI / 20);
|
||||
lv_style_set_pad_right(&sb, LV_STATE_DEFAULT, LV_DPI / 30);
|
||||
lv_style_set_pad_bottom(&sb, LV_STATE_DEFAULT, LV_DPI / 30);
|
||||
|
||||
#endif
|
||||
}
|
||||
@@ -659,6 +666,7 @@ static void list_init(void)
|
||||
{
|
||||
#if LV_USE_LIST != 0
|
||||
lv_style_init(&list_bg);
|
||||
lv_style_set_clip_corner(&list_bg, LV_STATE_DEFAULT, true);
|
||||
lv_style_set_pad_left(&list_bg, LV_STATE_DEFAULT, 0);
|
||||
lv_style_set_pad_right(&list_bg, LV_STATE_DEFAULT, 0);
|
||||
lv_style_set_pad_top(&list_bg, LV_STATE_DEFAULT, 0);
|
||||
@@ -738,25 +746,26 @@ static void tabview_init(void)
|
||||
lv_style_set_bg_color(&tabview_btns_bg, LV_STATE_DEFAULT, COLOR_BG);
|
||||
lv_style_set_border_color(&tabview_btns_bg, LV_STATE_DEFAULT,
|
||||
IS_LIGHT ? lv_color_hex(0xe4eaf0) : lv_color_hex(0x3b3e42));
|
||||
lv_style_set_border_width(&tabview_btns_bg, LV_STATE_DEFAULT, LV_DPI / 30 > 0 ? LV_DPI / 30 : 1);
|
||||
lv_style_set_border_width(&tabview_btns_bg, LV_STATE_DEFAULT, LV_DPI / 40 > 0 ? LV_DPI / 40 : 1);
|
||||
lv_style_set_border_side(&tabview_btns_bg, LV_STATE_DEFAULT, LV_BORDER_SIDE_BOTTOM);
|
||||
lv_style_set_text_color(&tabview_btns_bg, LV_STATE_DEFAULT, COLOR_SCR_TEXT);
|
||||
lv_style_set_text_font(&tabview_btns_bg, LV_STATE_DEFAULT, theme.font_normal);
|
||||
lv_style_set_image_recolor(&tabview_btns_bg, LV_STATE_DEFAULT, lv_color_hex(0x979a9f));
|
||||
lv_style_set_pad_top(&tabview_btns_bg, LV_STATE_DEFAULT, LV_DPI / 7);
|
||||
|
||||
lv_style_set_pad_top(&tabview_btns_bg, LV_STATE_DEFAULT, LV_DPI / 30);
|
||||
lv_style_set_pad_left(&tabview_btns_bg, LV_STATE_DEFAULT, LV_DPI / 30);
|
||||
lv_style_set_pad_right(&tabview_btns_bg, LV_STATE_DEFAULT, LV_DPI / 30);
|
||||
|
||||
lv_style_init(&tabview_btns);
|
||||
lv_style_set_bg_opa(&tabview_btns, LV_STATE_PRESSED, LV_OPA_50);
|
||||
lv_style_set_bg_color(&tabview_btns, LV_STATE_PRESSED, lv_color_hex3(0x888));
|
||||
lv_style_set_text_color(&tabview_btns, LV_STATE_CHECKED, COLOR_SCR_TEXT);
|
||||
lv_style_set_pad_top(&tabview_btns, LV_STATE_DEFAULT, LV_DPI / 7);
|
||||
lv_style_set_pad_bottom(&tabview_btns, LV_STATE_DEFAULT, LV_DPI / 7);
|
||||
lv_style_set_pad_top(&tabview_btns, LV_STATE_DEFAULT, LV_DPI / 10);
|
||||
lv_style_set_pad_bottom(&tabview_btns, LV_STATE_DEFAULT, LV_DPI / 10);
|
||||
|
||||
lv_style_init(&tabview_indic);
|
||||
lv_style_set_bg_opa(&tabview_indic, LV_STATE_DEFAULT, LV_OPA_COVER);
|
||||
lv_style_set_bg_color(&tabview_indic, LV_STATE_DEFAULT, theme.color_primary);
|
||||
lv_style_set_size(&tabview_indic, LV_STATE_DEFAULT, LV_DPI / 25 > 0 ? LV_DPI / 25 : 1);
|
||||
lv_style_set_size(&tabview_indic, LV_STATE_DEFAULT, LV_DPI / 40 > 0 ? LV_DPI / 40 : 1);
|
||||
lv_style_set_radius(&tabview_indic, LV_STATE_DEFAULT, LV_RADIUS_CIRCLE);
|
||||
|
||||
|
||||
@@ -1044,6 +1053,7 @@ void lv_theme_material_apply(lv_obj_t * obj, lv_theme_style_t name)
|
||||
lv_obj_clean_style_list(obj, LV_MSGBOX_PART_BG);
|
||||
list = lv_obj_get_style_list(obj, LV_MSGBOX_PART_BG);
|
||||
lv_style_list_add_style(list, &bg);
|
||||
lv_style_list_add_style(list, &mbox_bg);
|
||||
break;
|
||||
|
||||
case LV_THEME_MSGBOX_BTNS:
|
||||
@@ -1202,6 +1212,7 @@ void lv_theme_material_apply(lv_obj_t * obj, lv_theme_style_t name)
|
||||
|
||||
lv_obj_clean_style_list(obj, LV_CHART_PART_SERIES_BG);
|
||||
list = lv_obj_get_style_list(obj, LV_CHART_PART_SERIES_BG);
|
||||
lv_style_list_add_style(list, &pad_small);
|
||||
lv_style_list_add_style(list, &chart_series_bg);
|
||||
|
||||
lv_obj_clean_style_list(obj, LV_CHART_PART_SERIES);
|
||||
|
||||
Reference in New Issue
Block a user