From 86f44c974d24d950ed83666a30c8c3f73e6ae796 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 6 Nov 2019 05:32:42 +0100 Subject: [PATCH] cpicker: set default type --- src/lv_objx/lv_cpicker.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lv_objx/lv_cpicker.c b/src/lv_objx/lv_cpicker.c index d2bc62523..ae3d68cd3 100644 --- a/src/lv_objx/lv_cpicker.c +++ b/src/lv_objx/lv_cpicker.c @@ -106,6 +106,7 @@ lv_obj_t * lv_cpicker_create(lv_obj_t * par, const lv_obj_t * copy) if(ext == NULL) return NULL; /*Initialize the allocated 'ext' */ + ext->type = LV_CPICKER_DEF_TYPE; ext->hsv = LV_CPICKER_DEF_HSV; ext->indic.style = &lv_style_plain; ext->indic.colored = 0; @@ -121,6 +122,7 @@ lv_obj_t * lv_cpicker_create(lv_obj_t * par, const lv_obj_t * copy) /*If no copy do the basic initialization*/ if(copy == NULL) { + lv_obj_set_size(new_cpicker, LV_DPI * 2, LV_DPI * 2); lv_obj_set_protect(new_cpicker, LV_PROTECT_PRESS_LOST); lv_theme_t * th = lv_theme_get_current(); if(th) {