MXC-A36-Demo/Demo/lv_user_code/app/setting.c

83 lines
3.0 KiB
C
Raw Permalink Normal View History

#include "lvgl.h"
#include "img_def.h"
#include "demo.h"
#include "mxc_meter.h"
#include "setting.h"
#include "language_table.h"
void enter_theme_win(lv_obj_t *parent)
{
lv_obj_t *theme_main_win = lv_obj_create(parent);
lv_obj_set_style_pad_all(theme_main_win, 0, 0);
lv_obj_set_style_border_width(theme_main_win, 0, 0);
lv_obj_set_style_opa(theme_main_win, LV_OPA_100, 0);
lv_obj_set_size(theme_main_win, LV_PCT(100), LV_PCT(100));
lv_obj_set_style_radius(theme_main_win, 0, 0);
// lv_obj_set_style_bg_color(theme_main_win, lv_color_black(), 0);
lv_obj_set_style_bg_color(theme_main_win, lv_color_make(0xff, 0x00, 0x00), 0);
lv_obj_clear_flag(theme_main_win, LV_OBJ_FLAG_SCROLL_ELASTIC);
lv_obj_clear_flag(theme_main_win, LV_OBJ_FLAG_GESTURE_BUBBLE);
app_menu_comm_entry(theme_main_win, SUBMENU_SET_THEME, false);
}
void enter_light_win(lv_obj_t *parent)
{
lv_obj_t *light_main_win = lv_obj_create(parent);
lv_obj_set_style_pad_all(light_main_win, 0, 0);
lv_obj_set_style_border_width(light_main_win, 0, 0);
lv_obj_set_style_opa(light_main_win, LV_OPA_100, 0);
lv_obj_set_size(light_main_win, LV_PCT(100), LV_PCT(100));
lv_obj_set_style_radius(light_main_win, 0, 0);
// lv_obj_set_style_bg_color(light_main_win, lv_color_black(), 0);
lv_obj_set_style_bg_color(light_main_win, lv_color_make(0x00, 0xff, 0x00), 0);
lv_obj_clear_flag(light_main_win, LV_OBJ_FLAG_SCROLL_ELASTIC);
lv_obj_clear_flag(light_main_win, LV_OBJ_FLAG_GESTURE_BUBBLE);
app_menu_comm_entry(light_main_win, SUBMENU_SET_LIGHT, false);
}
void enter_bt_win(lv_obj_t *parent)
{
lv_obj_t *bt_main_win = lv_obj_create(parent);
lv_obj_set_style_pad_all(bt_main_win, 0, 0);
lv_obj_set_style_border_width(bt_main_win, 0, 0);
lv_obj_set_style_opa(bt_main_win, LV_OPA_100, 0);
lv_obj_set_size(bt_main_win, LV_PCT(100), LV_PCT(100));
lv_obj_set_style_radius(bt_main_win, 0, 0);
// lv_obj_set_style_bg_color(bt_main_win, lv_color_black(), 0);
lv_obj_set_style_bg_color(bt_main_win, lv_color_make(0x00, 0xff, 0x00), 0);
lv_obj_clear_flag(bt_main_win, LV_OBJ_FLAG_SCROLL_ELASTIC);
lv_obj_clear_flag(bt_main_win, LV_OBJ_FLAG_GESTURE_BUBBLE);
app_menu_comm_entry(bt_main_win, SUBMENU_SET_BLUETOOTH, false);
}
//void enter_bt_win(lv_obj_t *parent)
//{
// lv_obj_t *bt_main_win = lv_obj_create(parent);
// lv_obj_set_style_pad_all(bt_main_win, 0, 0);
// lv_obj_set_style_border_width(bt_main_win, 0, 0);
// lv_obj_set_style_opa(bt_main_win, LV_OPA_100, 0);
// lv_obj_set_size(bt_main_win, LV_PCT(100), LV_PCT(100));
// lv_obj_set_style_radius(bt_main_win, 0, 0);
//// lv_obj_set_style_bg_color(bt_main_win, lv_color_black(), 0);
// lv_obj_set_style_bg_color(bt_main_win, lv_color_make(0x00, 0xff, 0x00), 0);
//
// lv_obj_clear_flag(bt_main_win, LV_OBJ_FLAG_SCROLL_ELASTIC);
// lv_obj_clear_flag(bt_main_win, LV_OBJ_FLAG_GESTURE_BUBBLE);
//
// app_menu_comm_entry(bt_main_win, SUBMENU_SET_BLUETOOTH, false);
//
//
//}