mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
Merge pull request #1613 from 3096/lv_win-style-fix
material theme: fix lv_win uninitialed styles
This commit is contained in:
commit
3e8b39c404
@ -792,6 +792,39 @@ static void roller_init(void)
|
|||||||
static void tabview_init(void)
|
static void tabview_init(void)
|
||||||
{
|
{
|
||||||
#if LV_USE_TABVIEW != 0
|
#if LV_USE_TABVIEW != 0
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
static void tileview_init(void)
|
||||||
|
{
|
||||||
|
#if LV_USE_TILEVIEW != 0
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
static void table_init(void)
|
||||||
|
{
|
||||||
|
#if LV_USE_TABLE != 0
|
||||||
|
style_init_reset(&styles->table_cell);
|
||||||
|
lv_style_set_border_color(&styles->table_cell, LV_STATE_DEFAULT, COLOR_BG_BORDER);
|
||||||
|
lv_style_set_border_width(&styles->table_cell, LV_STATE_DEFAULT, 1);
|
||||||
|
lv_style_set_border_side(&styles->table_cell, LV_STATE_DEFAULT, LV_BORDER_SIDE_TOP | LV_BORDER_SIDE_BOTTOM);
|
||||||
|
lv_style_set_pad_left(&styles->table_cell, LV_STATE_DEFAULT, PAD_DEF);
|
||||||
|
lv_style_set_pad_right(&styles->table_cell, LV_STATE_DEFAULT, PAD_DEF);
|
||||||
|
lv_style_set_pad_top(&styles->table_cell, LV_STATE_DEFAULT, PAD_DEF);
|
||||||
|
lv_style_set_pad_bottom(&styles->table_cell, LV_STATE_DEFAULT, PAD_DEF);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
static void win_init(void)
|
||||||
|
{
|
||||||
|
#if LV_USE_WIN != 0
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
static void tabview_win_shared_init(void)
|
||||||
|
{
|
||||||
|
#if LV_USE_TABVIEW || LV_USE_WIN
|
||||||
style_init_reset(&styles->tabview_btns_bg);
|
style_init_reset(&styles->tabview_btns_bg);
|
||||||
lv_style_set_bg_opa(&styles->tabview_btns_bg, LV_STATE_DEFAULT, LV_OPA_COVER);
|
lv_style_set_bg_opa(&styles->tabview_btns_bg, LV_STATE_DEFAULT, LV_OPA_COVER);
|
||||||
lv_style_set_bg_color(&styles->tabview_btns_bg, LV_STATE_DEFAULT, COLOR_BG);
|
lv_style_set_bg_color(&styles->tabview_btns_bg, LV_STATE_DEFAULT, COLOR_BG);
|
||||||
@ -831,34 +864,6 @@ static void tabview_init(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void tileview_init(void)
|
|
||||||
{
|
|
||||||
#if LV_USE_TILEVIEW != 0
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static void table_init(void)
|
|
||||||
{
|
|
||||||
#if LV_USE_TABLE != 0
|
|
||||||
style_init_reset(&styles->table_cell);
|
|
||||||
lv_style_set_border_color(&styles->table_cell, LV_STATE_DEFAULT, COLOR_BG_BORDER);
|
|
||||||
lv_style_set_border_width(&styles->table_cell, LV_STATE_DEFAULT, 1);
|
|
||||||
lv_style_set_border_side(&styles->table_cell, LV_STATE_DEFAULT, LV_BORDER_SIDE_TOP | LV_BORDER_SIDE_BOTTOM);
|
|
||||||
lv_style_set_pad_left(&styles->table_cell, LV_STATE_DEFAULT, PAD_DEF);
|
|
||||||
lv_style_set_pad_right(&styles->table_cell, LV_STATE_DEFAULT, PAD_DEF);
|
|
||||||
lv_style_set_pad_top(&styles->table_cell, LV_STATE_DEFAULT, PAD_DEF);
|
|
||||||
lv_style_set_pad_bottom(&styles->table_cell, LV_STATE_DEFAULT, PAD_DEF);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static void win_init(void)
|
|
||||||
{
|
|
||||||
#if LV_USE_WIN != 0
|
|
||||||
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
* GLOBAL FUNCTIONS
|
* GLOBAL FUNCTIONS
|
||||||
@ -927,6 +932,7 @@ lv_theme_t * lv_theme_material_init(lv_color_t color_primary, lv_color_t color_s
|
|||||||
tileview_init();
|
tileview_init();
|
||||||
table_init();
|
table_init();
|
||||||
win_init();
|
win_init();
|
||||||
|
tabview_win_shared_init();
|
||||||
|
|
||||||
theme.apply_xcb = theme_apply;
|
theme.apply_xcb = theme_apply;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user