forked from enlightenment/efl
Revert "focus: Fixed the animation issue related to bring_in."
This reverts commit 422b8717660853ff099359dc3cd926e56f1b1665.
This commit is contained in:
parent
94bc3ce471
commit
52dacc461f
|
@ -714,21 +714,6 @@ _focus_highlight_clip_disable_changed_cb(void *data EINA_UNUSED,
|
||||||
elm_config_focus_highlight_clip_disabled_set(disable);
|
elm_config_focus_highlight_clip_disabled_set(disable);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
_focus_bring_in_changed_cb(void *data EINA_UNUSED,
|
|
||||||
Evas_Object *obj,
|
|
||||||
void *event_info EINA_UNUSED)
|
|
||||||
{
|
|
||||||
elm_config_focus_auto_scroll_bring_in_enabled_set(elm_check_state_get(obj));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
_horizontal_btn(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
|
|
||||||
{
|
|
||||||
Evas_Object *box_btn = data;
|
|
||||||
elm_box_horizontal_set(box_btn, elm_check_state_get(obj));
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
test_focus3(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
test_focus3(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||||
{
|
{
|
||||||
|
@ -806,21 +791,6 @@ test_focus3(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
|
||||||
_focus_highlight_clip_disable_changed_cb,
|
_focus_highlight_clip_disable_changed_cb,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
ck = elm_check_add(box);
|
|
||||||
elm_object_text_set(ck, "Focus Auto scroll bring in enable");
|
|
||||||
evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, 0.0);
|
|
||||||
evas_object_smart_callback_add(ck, "changed", _focus_bring_in_changed_cb,
|
|
||||||
NULL);
|
|
||||||
elm_check_state_set(ck, elm_config_focus_auto_scroll_bring_in_enabled_get());
|
|
||||||
elm_box_pack_end(box, ck);
|
|
||||||
evas_object_show(ck);
|
|
||||||
|
|
||||||
ck = elm_check_add(box);
|
|
||||||
elm_object_text_set(ck, "Horizontal Mode");
|
|
||||||
evas_object_smart_callback_add(ck, "changed", _horizontal_btn, box_btn);
|
|
||||||
elm_box_pack_end(box, ck);
|
|
||||||
evas_object_show(ck);
|
|
||||||
|
|
||||||
evas_object_show(win);
|
evas_object_show(win);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3789,35 +3789,8 @@ elm_widget_focus_highlight_focus_part_geometry_get(const Evas_Object *obj,
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_elm_widget_focus_highlight_geometry_get(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
|
_elm_widget_focus_highlight_geometry_get(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
|
||||||
{
|
{
|
||||||
Evas_Coord ox = 0, oy = 0, ow = 0, oh = 0;
|
|
||||||
Evas_Object *scroller = obj;
|
|
||||||
|
|
||||||
evas_object_geometry_get(obj, x, y, w, h);
|
evas_object_geometry_get(obj, x, y, w, h);
|
||||||
elm_widget_focus_highlight_focus_part_geometry_get(sd->resize_obj, x, y, w, h);
|
elm_widget_focus_highlight_focus_part_geometry_get(sd->resize_obj, x, y, w, h);
|
||||||
|
|
||||||
if (!_elm_config->focus_auto_scroll_bring_in_enable)
|
|
||||||
return;
|
|
||||||
|
|
||||||
while (scroller)
|
|
||||||
{
|
|
||||||
if (_elm_scrollable_is(scroller))
|
|
||||||
{
|
|
||||||
eo_do(scroller,
|
|
||||||
elm_interface_scrollable_content_viewport_geometry_get(&ox, &oy, &ow, &oh));
|
|
||||||
|
|
||||||
if (*y < oy)
|
|
||||||
*y = oy;
|
|
||||||
else if ((oy + oh) < (*y + *h))
|
|
||||||
*y = (oy + oh - *h);
|
|
||||||
else if (*x < ox)
|
|
||||||
*x = ox;
|
|
||||||
else if ((ox + ow) < (*x + *w))
|
|
||||||
*x = (ox + ow - *w);
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
scroller = elm_widget_parent_get(scroller);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static Elm_Object_Item*
|
EOLIAN static Elm_Object_Item*
|
||||||
|
|
Loading…
Reference in New Issue