BigW Consortium Gitlab

Commit 20af4072 by Kiss-Vamosi Gabor

Minor object updates with some object types

parent da1f4e8e
......@@ -402,28 +402,58 @@ static void lv_chart_draw_div(lv_obj_t * chart, const area_t * mask)
lv_style_t * style = lv_obj_get_style(chart);
uint8_t div_i;
uint8_t div_i_end;
uint8_t div_i_start;
point_t p1;
point_t p2;
cord_t w = lv_obj_get_width(chart);
cord_t h = lv_obj_get_height(chart);
cord_t x_ofs = chart->cords.x1;
cord_t y_ofs = chart->cords.y1;
p1.x = 0 + x_ofs;
p2.x = w + x_ofs;
for(div_i = 1; div_i <= ext->hdiv_num; div_i ++) {
p1.y = (int32_t)((int32_t)h * div_i) / (ext->hdiv_num + 1);
p1.y += y_ofs;
p2.y = p1.y;
lv_draw_line(&p1, &p2, mask, style);
if(ext->hdiv_num != 0) {
/*Draw slide lines if no border*/
if(style->bwidth != 0) {
div_i_start = 1;
div_i_end = ext->hdiv_num;
} else {
div_i_start = 0;
div_i_end = ext->hdiv_num + 1;
}
p1.x = 0 + x_ofs;
p2.x = w + x_ofs;
for(div_i = div_i_start; div_i <= div_i_end; div_i++) {
p1.y = (int32_t)((int32_t)h * div_i) / (ext->hdiv_num + 1);
p1.y += y_ofs;
if(div_i == div_i_start) p1.y += (style->line_width >> 1) + 1; /*The first line might not be visible*/
if(div_i == div_i_end) p1.y -= (style->line_width >> 1) + 1; /*The last line might not be visible*/
p2.y = p1.y;
lv_draw_line(&p1, &p2, mask, style);
}
}
p1.y = 0 + y_ofs;
p2.y = h + y_ofs;
for(div_i = 1; div_i <= ext->vdiv_num; div_i ++) {
p1.x = (int32_t)((int32_t)w * div_i) / (ext->vdiv_num + 1);
p1.x += x_ofs;
p2.x = p1.x;
lv_draw_line(&p1, &p2, mask, style);
if(ext->vdiv_num != 0) {
/*Draw slide lines if no border*/
if(style->bwidth != 0) {
div_i_start = 1;
div_i_end = ext->vdiv_num;
} else {
div_i_start = 0;
div_i_end = ext->vdiv_num + 1;
}
p1.y = 0 + y_ofs;
p2.y = h + y_ofs;
for(div_i = div_i_start; div_i <= div_i_end; div_i ++) {
p1.x = (int32_t)((int32_t)w * div_i) / (ext->vdiv_num + 1);
p1.x += x_ofs;
if(div_i == div_i_start) p1.x += (style->line_width >> 1) + 1; /*The first line might not be visible*/
if(div_i == div_i_end) p1.x -= (style->line_width >> 1) + 1; /*The last line might not be visible*/
p2.x = p1.x;
lv_draw_line(&p1, &p2, mask, style);
}
}
}
......
......@@ -17,7 +17,7 @@
*********************/
#define LV_LED_WIDTH_DEF (LV_DPI / 3)
#define LV_LED_HEIGHT_DEF (LV_DPI / 3)
#define LV_LED_BRIGHT_OFF 128
#define LV_LED_BRIGHT_OFF 100
#define LV_LED_BRIGHT_ON 255
/**********************
......
......@@ -69,7 +69,7 @@ lv_obj_t * lv_page_create(lv_obj_t * par, lv_obj_t * copy)
ext->sbh_draw = 0;
ext->sbv_draw = 0;
ext->style_sb = lv_style_get(LV_STYLE_PRETTY, NULL);
ext->sb_width = LV_DPI / 8;
ext->sb_width = LV_DPI / 8; /*Will be modified later*/
ext->sb_mode = LV_PAGE_SB_MODE_ON;
if(ancestor_design_f == NULL) ancestor_design_f = lv_obj_get_design_f(new_page);
......@@ -85,7 +85,7 @@ lv_obj_t * lv_page_create(lv_obj_t * par, lv_obj_t * copy)
lv_cont_set_fit(ext->scrl, true, true);
lv_obj_set_style(ext->scrl, lv_style_get(LV_STYLE_PRETTY, NULL));
lv_page_set_sb_width(new_page, ext->sb_width);
lv_page_set_sb_width(new_page, style->hpad);
lv_page_set_sb_mode(new_page, ext->sb_mode);
lv_page_set_style_sb(new_page, ext->style_sb);
......
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