Make the size and appearance of the number and text edit controls consistent with other UI elements. (#89)
This commit is contained in:
@@ -54,6 +54,12 @@ NumberEdit::NumberEdit(Window* parent, const rect_t& rect, int vmin, int vmax,
|
|||||||
lv_textarea_set_one_line(lvobj, true);
|
lv_textarea_set_one_line(lvobj, true);
|
||||||
lv_obj_add_event_cb(lvobj, numberedit_cb, LV_EVENT_KEY, this);
|
lv_obj_add_event_cb(lvobj, numberedit_cb, LV_EVENT_KEY, this);
|
||||||
|
|
||||||
|
setHeight(33);
|
||||||
|
padTop(5);
|
||||||
|
padRight(4);
|
||||||
|
lv_obj_set_style_text_align(lvobj, LV_TEXT_ALIGN_RIGHT, 0);
|
||||||
|
lv_obj_set_style_radius(lvobj, 4, 0);
|
||||||
|
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,6 +55,11 @@ TextEdit::TextEdit(Window *parent, const rect_t &rect, char *value,
|
|||||||
lv_textarea_set_placeholder_text(lvobj, "---");
|
lv_textarea_set_placeholder_text(lvobj, "---");
|
||||||
lv_textarea_set_max_length(lvobj, length);
|
lv_textarea_set_max_length(lvobj, length);
|
||||||
|
|
||||||
|
setHeight(33);
|
||||||
|
padTop(5);
|
||||||
|
padLeft(4);
|
||||||
|
lv_obj_set_style_radius(lvobj, 4, 0);
|
||||||
|
|
||||||
if (width() == 0) {
|
if (width() == 0) {
|
||||||
lv_obj_set_width(lvobj, LV_DPI_DEF);
|
lv_obj_set_width(lvobj, LV_DPI_DEF);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user