1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

Merge branch 'dev-7.0' of github.com:littlevgl/lvgl into dev-7.0

This commit is contained in:
Themba Dube 2020-05-07 16:37:00 -04:00
commit ceae45ed64
12 changed files with 23 additions and 26 deletions

View File

@ -123,7 +123,7 @@ typedef int16_t lv_coord_t;
#define LV_INDEV_DEF_DRAG_LIMIT 10
/* Drag throw slow-down in [%]. Greater value -> faster slow-down */
#define LV_INDEV_DEF_DRAG_THROW 20
#define LV_INDEV_DEF_DRAG_THROW 10
/* Long press time in milliseconds.
* Time to send `LV_EVENT_LONG_PRESSSED`) */

View File

@ -188,7 +188,7 @@
/* Drag throw slow-down in [%]. Greater value -> faster slow-down */
#ifndef LV_INDEV_DEF_DRAG_THROW
#define LV_INDEV_DEF_DRAG_THROW 20
#define LV_INDEV_DEF_DRAG_THROW 10
#endif
/* Long press time in milliseconds.

View File

@ -89,6 +89,7 @@ static void trans_anim_cb(lv_style_trans_t * tr, lv_anim_value_t v);
static void trans_anim_start_cb(lv_anim_t * a);
static void trans_anim_ready_cb(lv_anim_t * a);
static void opa_scale_anim(lv_obj_t * obj, lv_anim_value_t v);
static void fade_in_anim_ready(lv_anim_t * a);
#endif
static void lv_event_mark_deleted(lv_obj_t * obj);
static void lv_obj_del_async_cb(void * obj);
@ -3335,6 +3336,7 @@ void lv_obj_fade_in(lv_obj_t * obj, uint32_t time, uint32_t delay)
lv_anim_set_var(&a, obj);
lv_anim_set_values(&a, LV_OPA_TRANSP, LV_OPA_COVER);
lv_anim_set_exec_cb(&a, (lv_anim_exec_xcb_t)opa_scale_anim);
lv_anim_set_ready_cb(&a, fade_in_anim_ready);
lv_anim_set_time(&a, time);
lv_anim_set_delay(&a, delay);
lv_anim_start(&a);
@ -3948,6 +3950,11 @@ static void opa_scale_anim(lv_obj_t * obj, lv_anim_value_t v)
lv_obj_set_style_local_opa_scale(obj, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, v);
}
static void fade_in_anim_ready(lv_anim_t * a)
{
lv_style_remove_prop(lv_obj_get_local_style(a->var, LV_OBJ_PART_MAIN), LV_STYLE_OPA_SCALE);
}
#endif
static void lv_event_mark_deleted(lv_obj_t * obj)

View File

@ -14,10 +14,8 @@ extern "C" {
* INCLUDES
*********************/
#include "../lv_conf_internal.h"
#include "../lv_core/lv_style.h"
#include "../../lvgl.h"
#include "../lv_core/lv_obj.h"
/*********************
* DEFINES

View File

@ -7,9 +7,7 @@
* INCLUDES
*********************/
#include <stdint.h>
#include "lv_theme.h"
#include "../lv_widgets/lv_img.h"
#include "../lv_misc/lv_types.h"
#include "../../lvgl.h" /*To see all the widgets*/
#if LV_USE_THEME_EMPTY

View File

@ -6,11 +6,7 @@
/*********************
* INCLUDES
*********************/
#include <stdint.h>
#include "lv_theme.h"
#include "lv_theme_material.h"
#include "../lv_widgets/lv_img.h"
#include "../lv_misc/lv_types.h"
#include "../../lvgl.h" /*To see all the widgets*/
#if LV_USE_THEME_MATERIAL

View File

@ -6,10 +6,7 @@
/*********************
* INCLUDES
*********************/
#include <stdint.h>
#include "lv_theme.h"
#include "../lv_widgets/lv_img.h"
#include "../lv_misc/lv_types.h"
#include "../../lvgl.h" /*To see all the widgets*/
#if LV_USE_THEME_MONO

View File

@ -6,10 +6,7 @@
/*********************
* INCLUDES
*********************/
#include <stdint.h>
#include "lv_theme.h"
#include "../lv_widgets/lv_img.h"
#include "../lv_misc/lv_types.h"
#include "../../lvgl.h" /*To see all the widgets*/
#if LV_USE_THEME_TEMPLATE

View File

@ -13,6 +13,7 @@
#include "../lv_draw/lv_draw.h"
#include "../lv_core/lv_group.h"
#include "../lv_core/lv_indev.h"
#include "../lv_core/lv_disp.h"
#include "../lv_themes/lv_theme.h"
#include "../lv_font/lv_symbol_def.h"
#include "../lv_misc/lv_anim.h"

View File

@ -11,6 +11,7 @@
#include "../lv_core/lv_debug.h"
#include "../lv_core/lv_group.h"
#include "../lv_core/lv_disp.h"
#include "../lv_themes/lv_theme.h"
#include "../lv_misc/lv_anim.h"
#include "../lv_misc/lv_math.h"

View File

@ -19,6 +19,7 @@
#include "../lv_themes/lv_theme.h"
#include "../lv_misc/lv_math.h"
#include "../lv_core/lv_indev.h"
#include "../lv_core/lv_disp.h"
#include "lv_img.h"
/*********************
@ -303,17 +304,17 @@ static lv_res_t lv_switch_signal(lv_obj_t * sw, lv_signal_t sign, void * param)
if(res != LV_RES_OK) return res;
}
else if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) {
lv_style_int_t knob_left = lv_obj_get_style_pad_left(sw, LV_SLIDER_PART_KNOB);
lv_style_int_t knob_right = lv_obj_get_style_pad_right(sw, LV_SLIDER_PART_KNOB);
lv_style_int_t knob_top = lv_obj_get_style_pad_top(sw, LV_SLIDER_PART_KNOB);
lv_style_int_t knob_bottom = lv_obj_get_style_pad_bottom(sw, LV_SLIDER_PART_KNOB);
lv_style_int_t knob_left = lv_obj_get_style_pad_left(sw, LV_SWITCH_PART_KNOB);
lv_style_int_t knob_right = lv_obj_get_style_pad_right(sw, LV_SWITCH_PART_KNOB);
lv_style_int_t knob_top = lv_obj_get_style_pad_top(sw, LV_SWITCH_PART_KNOB);
lv_style_int_t knob_bottom = lv_obj_get_style_pad_bottom(sw, LV_SWITCH_PART_KNOB);
/* The smaller size is the knob diameter*/
lv_coord_t knob_size = LV_MATH_MIN(lv_obj_get_width(sw), lv_obj_get_height(sw)) >> 1;
knob_size += LV_MATH_MAX(LV_MATH_MAX(knob_left, knob_right), LV_MATH_MAX(knob_bottom, knob_top));
knob_size += 2; /*For rounding error*/
knob_size += lv_obj_get_draw_rect_ext_pad_size(sw, LV_SLIDER_PART_KNOB);
knob_size += lv_obj_get_draw_rect_ext_pad_size(sw, LV_SWITCH_PART_KNOB);
/*Indic. size is handled by bar*/
sw->ext_draw_pad = LV_MATH_MAX(sw->ext_draw_pad, knob_size);

View File

@ -10,6 +10,7 @@
#if LV_USE_TABLE != 0
#include "../lv_core/lv_debug.h"
#include "../lv_core/lv_indev.h"
#include "../lv_misc/lv_txt.h"
#include "../lv_misc/lv_math.h"
#include "../lv_draw/lv_draw_label.h"