BigW Consortium Gitlab

Commit c72a1614 by Kiss-Vamosi Gabor

lv_app style: minor updates

parent 082eb2da
...@@ -1011,9 +1011,10 @@ static void lv_app_init_style(void) ...@@ -1011,9 +1011,10 @@ static void lv_app_init_style(void)
/*Menu style*/ /*Menu style*/
lv_style_get(LV_STYLE_PLAIN,&app_style.menu); lv_style_get(LV_STYLE_PLAIN,&app_style.menu);
app_style.menu.ccolor = COLOR_WHITE; app_style.menu.ccolor = COLOR_WHITE;
app_style.menu.mcolor = COLOR_BLACK; app_style.menu.mcolor = COLOR_MAKE(0x30, 0x30, 0x30);
app_style.menu.gcolor = COLOR_BLACK; app_style.menu.gcolor = COLOR_MAKE(0x30, 0x30, 0x30);
app_style.menu.opa = OPA_80; app_style.menu.bcolor = COLOR_MAKE(0x80, 0x80, 0x80);
app_style.menu.opa = OPA_COVER;
app_style.menu.radius = 0; app_style.menu.radius = 0;
app_style.menu.bwidth = 0; app_style.menu.bwidth = 0;
app_style.menu.swidth = 0; app_style.menu.swidth = 0;
...@@ -1022,9 +1023,10 @@ static void lv_app_init_style(void) ...@@ -1022,9 +1023,10 @@ static void lv_app_init_style(void)
app_style.menu.opad = LV_DPI / 12; app_style.menu.opad = LV_DPI / 12;
lv_style_get(LV_STYLE_BTN_REL,&app_style.menu_btn_rel); lv_style_get(LV_STYLE_BTN_REL,&app_style.menu_btn_rel);
app_style.menu_btn_rel.ccolor = COLOR_MAKE(0xd0, 0xe0, 0xf0); app_style.menu_btn_rel.ccolor = COLOR_WHITE;
app_style.menu_btn_rel.mcolor = COLOR_BLACK; app_style.menu_btn_rel.mcolor = COLOR_MAKE(0x30, 0x30, 0x30);
app_style.menu_btn_rel.gcolor = COLOR_BLACK; app_style.menu_btn_rel.gcolor = COLOR_MAKE(0x30, 0x30, 0x30);
app_style.menu_btn_rel.bcolor = COLOR_MAKE(0x80, 0x80, 0x80);
app_style.menu_btn_rel.bwidth = 0; app_style.menu_btn_rel.bwidth = 0;
app_style.menu_btn_rel.radius = 0; app_style.menu_btn_rel.radius = 0;
app_style.menu_btn_rel.swidth = 0; app_style.menu_btn_rel.swidth = 0;
...@@ -1038,6 +1040,7 @@ static void lv_app_init_style(void) ...@@ -1038,6 +1040,7 @@ static void lv_app_init_style(void)
memcpy(&app_style.menu_btn_pr, &app_style.menu_btn_rel, sizeof(lv_style_t)); memcpy(&app_style.menu_btn_pr, &app_style.menu_btn_rel, sizeof(lv_style_t));
app_style.menu_btn_pr.mcolor = COLOR_GRAY; app_style.menu_btn_pr.mcolor = COLOR_GRAY;
app_style.menu_btn_pr.gcolor = COLOR_GRAY; app_style.menu_btn_pr.gcolor = COLOR_GRAY;
app_style.menu_btn_pr.bcolor = COLOR_GRAY;
app_style.menu_btn_pr.bwidth = 0; app_style.menu_btn_pr.bwidth = 0;
app_style.menu_btn_pr.radius = 0; app_style.menu_btn_pr.radius = 0;
app_style.menu_btn_pr.empty = 0; app_style.menu_btn_pr.empty = 0;
......
...@@ -234,6 +234,7 @@ static void my_win_open(lv_app_inst_t * app, lv_obj_t * win) ...@@ -234,6 +234,7 @@ static void my_win_open(lv_app_inst_t * app, lv_obj_t * win)
{ {
my_win_data_t * win_data = app->win_data; my_win_data_t * win_data = app->win_data;
/*Make the window content responsive*/
lv_cont_set_layout(lv_page_get_scrl(lv_win_get_page(win)), LV_CONT_LAYOUT_PRETTY); lv_cont_set_layout(lv_page_get_scrl(lv_win_get_page(win)), LV_CONT_LAYOUT_PRETTY);
/*Create a chart with two data lines*/ /*Create a chart with two data lines*/
......
...@@ -254,6 +254,7 @@ static void my_win_open(lv_app_inst_t * app, lv_obj_t * win) ...@@ -254,6 +254,7 @@ static void my_win_open(lv_app_inst_t * app, lv_obj_t * win)
my_win_data_t * win_data = app->win_data; my_win_data_t * win_data = app->win_data;
my_app_data_t * app_data = app->app_data; my_app_data_t * app_data = app->app_data;
/*Make the window content responsive*/
lv_cont_set_layout(lv_page_get_scrl(lv_win_get_page(win)), LV_CONT_LAYOUT_PRETTY); lv_cont_set_layout(lv_page_get_scrl(lv_win_get_page(win)), LV_CONT_LAYOUT_PRETTY);
/*Create a label for the text of the terminal*/ /*Create a label for the text of the terminal*/
...@@ -264,7 +265,7 @@ static void my_win_open(lv_app_inst_t * app, lv_obj_t * win) ...@@ -264,7 +265,7 @@ static void my_win_open(lv_app_inst_t * app, lv_obj_t * win)
/*Create a text area. Text can be added to the terminal from here by app. keyboard.*/ /*Create a text area. Text can be added to the terminal from here by app. keyboard.*/
win_data->ta = lv_ta_create(win, NULL); win_data->ta = lv_ta_create(win, NULL);
lv_obj_set_size(win_data->ta, lv_win_get_width(win), LV_VER_RES / 4); lv_obj_set_size(win_data->ta, 3 * LV_HOR_RES / 5, LV_VER_RES / 4);
lv_obj_set_free_p(win_data->ta, app); lv_obj_set_free_p(win_data->ta, app);
lv_page_set_rel_action(win_data->ta, win_ta_rel_action); lv_page_set_rel_action(win_data->ta, win_ta_rel_action);
lv_page_glue_obj(win_data->ta, true); lv_page_glue_obj(win_data->ta, true);
...@@ -282,7 +283,6 @@ static void my_win_open(lv_app_inst_t * app, lv_obj_t * win) ...@@ -282,7 +283,6 @@ static void my_win_open(lv_app_inst_t * app, lv_obj_t * win)
/*Align the window to see the text area on the bottom*/ /*Align the window to see the text area on the bottom*/
lv_obj_t * page = lv_win_get_page(app->win); lv_obj_t * page = lv_win_get_page(app->win);
lv_obj_align(lv_page_get_scrl(page), NULL, LV_ALIGN_IN_BOTTOM_LEFT, 0, - LV_VER_RES); lv_obj_align(lv_page_get_scrl(page), NULL, LV_ALIGN_IN_BOTTOM_LEFT, 0, - LV_VER_RES);
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment