improve INPUT_CUSTOM_PASSWORD

This commit is contained in:
lixianjing 2019-12-09 12:45:29 +08:00
parent 414ff4eb66
commit beed0687b4
4 changed files with 18 additions and 5 deletions

View File

@ -3,6 +3,7 @@
* 2019/12/09
* 完善 dialog ex 的文本翻译。
* 支持设置 combobox popup 的 style。
* edit 增加input type "custom_password"类型。
* 2019/12/07
* 修改 widget\_set\_state 脚本绑定时的问题(感谢大恒提供补丁)。

View File

@ -36,10 +36,17 @@ static const key_type_value_t align_v_name_value[] = {
{"top", 0, ALIGN_V_TOP}, {"middle", 0, ALIGN_V_MIDDLE}, {"bottom", 0, ALIGN_V_BOTTOM}};
static const key_type_value_t input_type_name_value[] = {
{"int", 0, INPUT_INT}, {"float", 0, INPUT_FLOAT}, {"uint", 0, INPUT_UINT},
{"ufloat", 0, INPUT_UFLOAT}, {"text", 0, INPUT_TEXT}, {"password", 0, INPUT_PASSWORD},
{"hex", 0, INPUT_HEX}, {"email", 0, INPUT_EMAIL}, {"phone", 0, INPUT_PHONE},
{"int", 0, INPUT_INT},
{"float", 0, INPUT_FLOAT},
{"uint", 0, INPUT_UINT},
{"ufloat", 0, INPUT_UFLOAT},
{"text", 0, INPUT_TEXT},
{"password", 0, INPUT_PASSWORD},
{"hex", 0, INPUT_HEX},
{"email", 0, INPUT_EMAIL},
{"phone", 0, INPUT_PHONE},
{"custom", 0, INPUT_CUSTOM},
{"custom_password", 0, INPUT_CUSTOM_PASSWORD},
};
static const key_type_value_t align_h_name_value[] = {

View File

@ -90,7 +90,12 @@ typedef enum _input_type_t {
* @const INPUT_CUSTOM
* 使()
*/
INPUT_CUSTOM
INPUT_CUSTOM,
/**
* @const INPUT_CUSTOM_PASSWORD
* 使
*/
INPUT_CUSTOM_PASSWORD
} input_type_t;
/**

View File

@ -69,7 +69,7 @@ ret_t edit_on_paint_self(widget_t* widget, canvas_t* c) {
edit_t* edit = EDIT(widget);
return_value_if_fail(edit != NULL, RET_BAD_PARAMS);
if (edit->input_type != INPUT_PASSWORD && edit->input_type != INPUT_CUSTOM) {
if (edit->input_type != INPUT_PASSWORD && edit->input_type != INPUT_CUSTOM_PASSWORD) {
text_edit_set_mask(edit->model, FALSE);
}