diff --git a/lv_conf_template.h b/lv_conf_template.h index 86de61733d..30df1144c2 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -65,9 +65,9 @@ * The 4th is extra large which has no upper limit so not listed here * The upper limit of the categories are set below in 0.1 inch unit. */ -#define LV_DISP_SMALL_LIMIT 25 -#define LV_DISP_MEDIUM_LIMIT 45 -#define LV_DISP_LARGE_LIMIT 65 +#define LV_DISP_SMALL_LIMIT 30 +#define LV_DISP_MEDIUM_LIMIT 50 +#define LV_DISP_LARGE_LIMIT 70 /* Type of coordinates. Should be `int16_t` (or `int32_t` for extreme cases) */ typedef int16_t lv_coord_t; diff --git a/src/lv_conf_internal.h b/src/lv_conf_internal.h index 7abfa6de40..ba77fc14f2 100644 --- a/src/lv_conf_internal.h +++ b/src/lv_conf_internal.h @@ -97,13 +97,13 @@ * The upper limit of the categories are set below in 0.1 inch unit. */ #ifndef LV_DISP_SMALL_LIMIT -#define LV_DISP_SMALL_LIMIT 25 +#define LV_DISP_SMALL_LIMIT 30 #endif #ifndef LV_DISP_MEDIUM_LIMIT -#define LV_DISP_MEDIUM_LIMIT 45 +#define LV_DISP_MEDIUM_LIMIT 50 #endif #ifndef LV_DISP_LARGE_LIMIT -#define LV_DISP_LARGE_LIMIT 65 +#define LV_DISP_LARGE_LIMIT 70 #endif /* Type of coordinates. Should be `int16_t` (or `int32_t` for extreme cases) */ diff --git a/src/lv_core/lv_disp.h b/src/lv_core/lv_disp.h index e095d8cafa..91c34d4bcd 100644 --- a/src/lv_core/lv_disp.h +++ b/src/lv_core/lv_disp.h @@ -152,7 +152,7 @@ static inline void lv_scr_load(lv_obj_t * scr) * 1 dip is 2 px on a 320 DPI screen * https://stackoverflow.com/questions/2025282/what-is-the-difference-between-px-dip-dp-and-sp */ -#define LV_DPX(n) LV_MATH_MAX(((LV_DPI * (n)) / 160), 1) +#define LV_DPX(n) LV_MATH_MAX(((LV_DPI * (n) + 80) / 160), 1) /*+80 for rounding*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/src/lv_themes/lv_theme_material.c b/src/lv_themes/lv_theme_material.c index d0d0d4da7b..bc49997ef9 100644 --- a/src/lv_themes/lv_theme_material.c +++ b/src/lv_themes/lv_theme_material.c @@ -63,7 +63,7 @@ #define COLOR_BG_SEC_TEXT_DIS (IS_LIGHT ? lv_color_hex(0xaaaaaa) : lv_color_hex(0xa5a8ad)) #define TRANSITION_TIME 150 -#define BORDER_WIDTH LV_DPX(3) +#define BORDER_WIDTH LV_DPX(2) #define IS_LIGHT (theme.flags & LV_THEME_MATERIAL_FLAG_LIGHT) /**********************