diff --git a/src/lv_themes/lv_theme_material.c b/src/lv_themes/lv_theme_material.c index 92386b739..9034426f4 100644 --- a/src/lv_themes/lv_theme_material.c +++ b/src/lv_themes/lv_theme_material.c @@ -393,10 +393,10 @@ static void slider_init(void) lv_style_set_bg_color(&slider_knob, LV_STATE_DEFAULT, IS_LIGHT ? theme.color_primary : LV_COLOR_WHITE); lv_style_set_value_color(&slider_knob, LV_STATE_DEFAULT, IS_LIGHT ? lv_color_hex(0x31404f) : LV_COLOR_WHITE); lv_style_set_radius(&slider_knob, LV_STATE_DEFAULT, LV_RADIUS_CIRCLE); - lv_style_set_pad_left(&slider_knob, LV_STATE_DEFAULT, LV_DPX(10)); - lv_style_set_pad_right(&slider_knob, LV_STATE_DEFAULT, LV_DPX(10)); - lv_style_set_pad_top(&slider_knob, LV_STATE_DEFAULT, LV_DPX(10)); - lv_style_set_pad_bottom(&slider_knob, LV_STATE_DEFAULT, LV_DPX(10)); + lv_style_set_pad_left(&slider_knob, LV_STATE_DEFAULT, LV_DPX(7)); + lv_style_set_pad_right(&slider_knob, LV_STATE_DEFAULT, LV_DPX(7)); + lv_style_set_pad_top(&slider_knob, LV_STATE_DEFAULT, LV_DPX(7)); + lv_style_set_pad_bottom(&slider_knob, LV_STATE_DEFAULT, LV_DPX(7)); style_init_reset(&slider_bg); lv_style_set_margin_left(&slider_bg, LV_STATE_DEFAULT, LV_DPX(15)); @@ -414,10 +414,10 @@ static void switch_init(void) lv_style_set_bg_opa(&sw_knob, LV_STATE_DEFAULT, LV_OPA_COVER); lv_style_set_bg_color(&sw_knob, LV_STATE_DEFAULT, LV_COLOR_WHITE); lv_style_set_radius(&sw_knob, LV_STATE_DEFAULT, LV_RADIUS_CIRCLE); - lv_style_set_pad_top(&sw_knob, LV_STATE_DEFAULT, - LV_DPX(8)); - lv_style_set_pad_bottom(&sw_knob, LV_STATE_DEFAULT, - LV_DPX(8)); - lv_style_set_pad_left(&sw_knob, LV_STATE_DEFAULT, - LV_DPX(8)); - lv_style_set_pad_right(&sw_knob, LV_STATE_DEFAULT, - LV_DPX(8)); + lv_style_set_pad_top(&sw_knob, LV_STATE_DEFAULT, - LV_DPX(4)); + lv_style_set_pad_bottom(&sw_knob, LV_STATE_DEFAULT, - LV_DPX(4)); + lv_style_set_pad_left(&sw_knob, LV_STATE_DEFAULT, - LV_DPX(4)); + lv_style_set_pad_right(&sw_knob, LV_STATE_DEFAULT, - LV_DPX(4)); #endif } diff --git a/src/lv_widgets/lv_switch.c b/src/lv_widgets/lv_switch.c index 918b00e81..54741f58f 100644 --- a/src/lv_widgets/lv_switch.c +++ b/src/lv_widgets/lv_switch.c @@ -90,7 +90,7 @@ lv_obj_t * lv_switch_create(lv_obj_t * par, const lv_obj_t * copy) if(copy == NULL) { lv_obj_set_click(sw, true); lv_obj_add_protect(sw, LV_PROTECT_PRESS_LOST); - lv_obj_set_size(sw, LV_DPX(70), LV_DPX(40)); + lv_obj_set_size(sw, LV_DPX(60), LV_DPX(35)); lv_bar_set_range(sw, 0, 1); lv_theme_apply(sw, LV_THEME_SWITCH);