lv_ta: pwd_mode added, lv_label:pwd_mode deleted

This commit is contained in:
Gabor
2017-07-07 16:22:24 +02:00
parent 119c4b577b
commit 168bda2b8f
6 changed files with 186 additions and 56 deletions

View File

@@ -313,18 +313,13 @@ void lv_draw_label(const area_t * cords_p,const area_t * mask_p, const lv_style_
}
}
char letter = txt[i];
color_t color = style->ccolor;
if((flag & TXT_FLAG_PWD) != 0 && txt[i + 1] != '\0') letter = '*';
if(cmd_state == CMD_STATE_IN) color = recolor;
letter_fp(&pos, mask_p, font, letter, color, style->opa);
letter_fp(&pos, mask_p, font, txt[i], color, style->opa);
pos.x += (font_get_width(font, txt[i]) >> FONT_ANTIALIAS) + style->letter_space;
if((flag & TXT_FLAG_PWD) == 0 || txt[i + 1] == '\0') {
pos.x += (font_get_width(font, txt[i]) >> FONT_ANTIALIAS) + style->letter_space;
} else {
pos.x += (font_get_width(font, '*') >> FONT_ANTIALIAS) + style->letter_space;
}
}
/*Go to next line*/
line_start = line_end;