From c72a16147cc063a08445205b3eca49295347dbb5 Mon Sep 17 00:00:00 2001 From: Kiss-Vamosi Gabor Date: Mon, 1 May 2017 22:36:35 +0200 Subject: [PATCH] lv_app style: minor updates --- lv_app/lv_app.c | 15 +++++++++------ lv_appx/lv_app_sysmon.c | 1 + lv_appx/lv_app_terminal.c | 4 ++-- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/lv_app/lv_app.c b/lv_app/lv_app.c index b3b4f958f..0725b1197 100644 --- a/lv_app/lv_app.c +++ b/lv_app/lv_app.c @@ -1011,9 +1011,10 @@ static void lv_app_init_style(void) /*Menu style*/ lv_style_get(LV_STYLE_PLAIN,&app_style.menu); app_style.menu.ccolor = COLOR_WHITE; - app_style.menu.mcolor = COLOR_BLACK; - app_style.menu.gcolor = COLOR_BLACK; - app_style.menu.opa = OPA_80; + app_style.menu.mcolor = COLOR_MAKE(0x30, 0x30, 0x30); + app_style.menu.gcolor = COLOR_MAKE(0x30, 0x30, 0x30); + app_style.menu.bcolor = COLOR_MAKE(0x80, 0x80, 0x80); + app_style.menu.opa = OPA_COVER; app_style.menu.radius = 0; app_style.menu.bwidth = 0; app_style.menu.swidth = 0; @@ -1022,9 +1023,10 @@ static void lv_app_init_style(void) app_style.menu.opad = LV_DPI / 12; 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.mcolor = COLOR_BLACK; - app_style.menu_btn_rel.gcolor = COLOR_BLACK; + app_style.menu_btn_rel.ccolor = COLOR_WHITE; + app_style.menu_btn_rel.mcolor = COLOR_MAKE(0x30, 0x30, 0x30); + 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.radius = 0; app_style.menu_btn_rel.swidth = 0; @@ -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)); app_style.menu_btn_pr.mcolor = 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.radius = 0; app_style.menu_btn_pr.empty = 0; diff --git a/lv_appx/lv_app_sysmon.c b/lv_appx/lv_app_sysmon.c index 936933576..ef747f4f5 100644 --- a/lv_appx/lv_app_sysmon.c +++ b/lv_appx/lv_app_sysmon.c @@ -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; + /*Make the window content responsive*/ lv_cont_set_layout(lv_page_get_scrl(lv_win_get_page(win)), LV_CONT_LAYOUT_PRETTY); /*Create a chart with two data lines*/ diff --git a/lv_appx/lv_app_terminal.c b/lv_appx/lv_app_terminal.c index ba5b4b5cc..0e91e946a 100644 --- a/lv_appx/lv_app_terminal.c +++ b/lv_appx/lv_app_terminal.c @@ -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_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); /*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) /*Create a text area. Text can be added to the terminal from here by app. keyboard.*/ 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_page_set_rel_action(win_data->ta, win_ta_rel_action); 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) /*Align the window to see the text area on the bottom*/ 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); - } /**