mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
fix(spinbox): set its default width in its class
This commit is contained in:
parent
bb03fb197c
commit
3d92972695
@ -28,7 +28,7 @@
|
||||
#endif
|
||||
|
||||
#if LV_GRAD_CACHE_DEF_SIZE != 0 && LV_GRAD_CACHE_DEF_SIZE < 256
|
||||
#error "LV_GRAD_CACHE_DEF_SIZE is too small"
|
||||
#error "LV_GRAD_CACHE_DEF_SIZE is too small"
|
||||
#endif
|
||||
|
||||
/**********************
|
||||
|
@ -34,6 +34,7 @@ static void lv_spinbox_updatevalue(lv_obj_t * obj);
|
||||
const lv_obj_class_t lv_spinbox_class = {
|
||||
.constructor_cb = lv_spinbox_constructor,
|
||||
.event_cb = lv_spinbox_event,
|
||||
.width_def = LV_DPI_DEF,
|
||||
.instance_size = sizeof(lv_spinbox_t),
|
||||
.editable = LV_OBJ_CLASS_EDITABLE_TRUE,
|
||||
.base_class = &lv_textarea_class
|
||||
@ -336,7 +337,6 @@ static void lv_spinbox_constructor(const lv_obj_class_t * class_p, lv_obj_t * ob
|
||||
|
||||
lv_textarea_set_one_line(obj, true);
|
||||
lv_textarea_set_cursor_click_pos(obj, true);
|
||||
lv_obj_set_width(obj, LV_DPI_DEF);
|
||||
|
||||
lv_spinbox_updatevalue(obj);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user