fix(color): Slider control blocking RTN key, slider rotEnc activation (#3966)
* Fix for slider control blocking RTN key. * Fix rotary encoder activation for slider.
This commit is contained in:
@@ -523,6 +523,9 @@ void etx_slider_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj)
|
|||||||
lv_obj_add_style(obj, &styles.circle, LV_PART_KNOB);
|
lv_obj_add_style(obj, &styles.circle, LV_PART_KNOB);
|
||||||
lv_obj_add_style(obj, &styles.bg_color_focus, LV_PART_MAIN | LV_STATE_FOCUSED);
|
lv_obj_add_style(obj, &styles.bg_color_focus, LV_PART_MAIN | LV_STATE_FOCUSED);
|
||||||
lv_obj_add_style(obj, &styles.bg_color_focus, LV_PART_MAIN | LV_STATE_FOCUSED | LV_STATE_EDITED);
|
lv_obj_add_style(obj, &styles.bg_color_focus, LV_PART_MAIN | LV_STATE_FOCUSED | LV_STATE_EDITED);
|
||||||
|
lv_obj_add_style(obj, &styles.bg_color_focus, LV_PART_INDICATOR | LV_STATE_FOCUSED);
|
||||||
|
lv_obj_add_style(obj, &styles.bg_color_focus, LV_PART_INDICATOR | LV_STATE_FOCUSED | LV_STATE_EDITED);
|
||||||
|
lv_obj_add_style(obj, &styles.bg_color_edit, LV_PART_KNOB | LV_STATE_FOCUSED | LV_STATE_EDITED);
|
||||||
}
|
}
|
||||||
|
|
||||||
void etx_btnmatrix_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj)
|
void etx_btnmatrix_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj)
|
||||||
|
|||||||
+1
-1
@@ -43,7 +43,7 @@ Slider::Slider(Window* parent, coord_t width, int32_t vmin, int32_t vmax,
|
|||||||
{
|
{
|
||||||
padAll(7);
|
padAll(7);
|
||||||
|
|
||||||
auto slider = etx_slider_create(lvobj);
|
auto slider = (new FormField(this, rect_t{}, 0, 0, etx_slider_create))->getLvObj();
|
||||||
lv_obj_set_width(slider, lv_pct(100));
|
lv_obj_set_width(slider, lv_pct(100));
|
||||||
|
|
||||||
lv_obj_add_event_cb(slider, slider_changed_cb, LV_EVENT_VALUE_CHANGED, this);
|
lv_obj_add_event_cb(slider, slider_changed_cb, LV_EVENT_VALUE_CHANGED, this);
|
||||||
|
|||||||
Reference in New Issue
Block a user