Background->Color als global #define
This commit is contained in:
@@ -139,7 +139,7 @@ void lv_create_main_gui(void) {
|
||||
arcHum.arc = aHum;
|
||||
buildarc(arcHum);
|
||||
|
||||
lv_obj_set_style_bg_color(lv_screen_active(), lv_color_hex(0xADD8E6), LV_PART_MAIN);
|
||||
lv_obj_set_style_bg_color(lv_screen_active(), lv_color_hex(BACKGROUND_COLOR), LV_PART_MAIN);
|
||||
|
||||
|
||||
}
|
||||
@@ -192,7 +192,7 @@ void setValuetoArc(ARC arc, float value) {
|
||||
//lv_style_set_bg_color(&style_container_row, lv_palette_lighten(LV_PALETTE_LIGHT_BLUE, 4));
|
||||
lv_obj_add_style(container_row, &style_container_row, 0);
|
||||
lv_obj_set_style_border_side(container_row, LV_BORDER_SIDE_BOTTOM, LV_PART_MAIN);
|
||||
lv_obj_set_style_bg_color(container_row, lv_color_hex(0xADD8E6), LV_PART_MAIN);
|
||||
lv_obj_set_style_bg_color(container_row, lv_color_hex(BACKGROUND_COLOR), LV_PART_MAIN);
|
||||
|
||||
|
||||
// linke Axe
|
||||
@@ -234,7 +234,7 @@ void setValuetoArc(ARC arc, float value) {
|
||||
lv_obj_set_style_size(chart, 0, 0, LV_PART_INDICATOR); // No points on line
|
||||
lv_obj_set_scrollbar_mode(chart, LV_SCROLLBAR_MODE_OFF);
|
||||
lv_obj_set_style_border_width(chart, 0, LV_PART_MAIN); // No border
|
||||
lv_obj_set_style_bg_color(chart, lv_color_hex(0xADD8E6), LV_PART_MAIN);
|
||||
lv_obj_set_style_bg_color(chart, lv_color_hex(BACKGROUND_COLOR), LV_PART_MAIN);
|
||||
|
||||
// lv_obj_set_style_pad_right(chart, -10, LV_PART_MAIN); // No border
|
||||
/*Add data series*/
|
||||
@@ -263,7 +263,7 @@ void setValuetoArc(ARC arc, float value) {
|
||||
lv_obj_set_style_line_width(scale, 0, LV_PART_ITEMS);
|
||||
lv_obj_set_style_line_width(scale, 1, LV_PART_INDICATOR);
|
||||
lv_obj_set_style_line_width(scale, 0, LV_PART_MAIN);
|
||||
lv_obj_set_style_bg_color(scale, lv_color_hex(0xADD8E6), LV_PART_MAIN);
|
||||
lv_obj_set_style_bg_color(scale, lv_color_hex(BACKGROUND_COLOR), LV_PART_MAIN);
|
||||
lv_scale_set_range(scale, 40, 100);
|
||||
|
||||
static lv_style_t style_scale;
|
||||
|
||||
@@ -35,7 +35,7 @@ typedef struct {
|
||||
#define SCREEN_WIDTH 320
|
||||
#define SCREEN_HEIGHT 240
|
||||
|
||||
|
||||
#define BACKGROUND_COLOR 0xD3F0FF
|
||||
#ifdef MAIN
|
||||
ARC arcTemp = {NULL, "temp", 40, -1, 110, 30.0, "%.1f°C", "°C", 10, 30, 20, 25, -11};
|
||||
ARC arcHum = {NULL, "humi", 170, -1, 110, 60.0, "%.0f%%", "%", 40, 100, 65, 70, 2};
|
||||
|
||||
Reference in New Issue
Block a user