diff --git a/CHANGELOG.md b/CHANGELOG.md index 2cb04bd210..22fe7c57a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## v7.9.1 (Planned at 19.01.2020 + +### Bugfixes +- fix(cpicker) fix division by zero +- fix(dropdown) fix selecting options after the last one + ## v7.9.0 (Plann1d at 05.01.2020 ### New features diff --git a/library.json b/library.json index ff0c61aac5..1016a2c4f0 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "lvgl", - "version": "7.10.0", + "version": "7.10.0", "keywords": "graphics, gui, embedded, tft, lvgl", "description": "Graphics library to create embedded GUI with easy-to-use graphical elements, beautiful visual effects and low memory footprint. It offers anti-aliasing, opacity, and animations using only one frame buffer.", "repository": { diff --git a/lvgl.h b/lvgl.h index f852caf80a..c563781005 100644 --- a/lvgl.h +++ b/lvgl.h @@ -17,7 +17,7 @@ extern "C" { #define LVGL_VERSION_MAJOR 7 #define LVGL_VERSION_MINOR 10 #define LVGL_VERSION_PATCH 0 -#define LVGL_VERSION_INFO "" +#define LVGL_VERSION_INFO "dev" /********************* * INCLUDES diff --git a/scripts/release/release.py b/scripts/release/release.py index edcdf79e4c..e45acbe4b9 100755 --- a/scripts/release/release.py +++ b/scripts/release/release.py @@ -88,7 +88,7 @@ def lv_examples_release(ver): com.update_version(ver) - com.cmd("sed -i -r 's/LV_VERSION_CHECK\([0-9]+, *[0-9]+, *[0-9]+\)/"+ "LV_VERSION_CHECK(" + str(ver[0]) + ", " + str(ver[1]) + ", " + str(ver[2]) + ")/' lv_examples.h") + com.cmd("sed -i -r 's/LV_VERSION_CHECK\([0-9]+, *[0-9]+, *[0-9]+\)/"+ "LV_VERSION_CHECK\(" + str(ver[0]) + ", " + str(ver[1]) + ", " + str(ver[2]) + ")/' lv_examples.h") com.cmd('git commit -am "Release ' + ver_str + '"') com.cmd("git tag -a " + ver_str + " -m 'Release " + ver_str + "' ") diff --git a/src/lv_widgets/lv_cpicker.c b/src/lv_widgets/lv_cpicker.c index 49efb9bd52..70cd3aeffd 100644 --- a/src/lv_widgets/lv_cpicker.c +++ b/src/lv_widgets/lv_cpicker.c @@ -579,6 +579,7 @@ static void draw_rect_grad(lv_obj_t * cpicker, const lv_area_t * mask) } lv_coord_t grad_w = lv_area_get_width(&grad_area); + if(grad_w < 1) return; uint16_t i_step = LV_MATH_MAX(LV_CPICKER_DEF_QF, 360 / grad_w); bg_dsc.radius = 0; bg_dsc.border_width = 0; diff --git a/src/lv_widgets/lv_dropdown.c b/src/lv_widgets/lv_dropdown.c index 60f78d52cc..31eae45890 100644 --- a/src/lv_widgets/lv_dropdown.c +++ b/src/lv_widgets/lv_dropdown.c @@ -1298,6 +1298,7 @@ static void page_press_handler(lv_obj_t * page) static uint16_t get_id_on_point(lv_obj_t * ddlist, lv_coord_t y) { + lv_dropdown_ext_t * ext = lv_obj_get_ext_attr(ddlist); lv_obj_t * label = get_label(ddlist); if(label == NULL) return 0; y -= label->coords.y1; @@ -1311,6 +1312,7 @@ static uint16_t get_id_on_point(lv_obj_t * ddlist, lv_coord_t y) uint16_t opt = y / h; + if(opt >= ext->option_cnt) opt = ext->option_cnt - 1; return opt; } diff --git a/src/lv_widgets/lv_win.c b/src/lv_widgets/lv_win.c index f0c8c64572..332bbc5e12 100644 --- a/src/lv_widgets/lv_win.c +++ b/src/lv_widgets/lv_win.c @@ -607,7 +607,8 @@ static lv_design_res_t lv_win_header_design(lv_obj_t * header, const lv_area_t * txt_area.y1 = header->coords.y1 + (lv_obj_get_height(header) - txt_size.y) / 2; txt_area.y2 = txt_area.y1 + txt_size.y; break; - case LV_TXT_FLAG_FIT || LV_TXT_FLAG_EXPAND: + case LV_TXT_FLAG_FIT: + case LV_TXT_FLAG_EXPAND: txt_area.x1 = header->coords.x1; txt_area.x2 = header->coords.x2; txt_area.y1 = header->coords.y1 + (lv_obj_get_height(header) - txt_size.y) / 2;