value "scroll_smooth_history_weight" double: 0.1;
value "scroll_smooth_future_time" double: 0.0;
value "scroll_smooth_time_window" double: 0.01;
+ value "focus_auto_scroll_bring_in_enable" uchar: 0;
value "scale" double: 1.0;
value "bgpixmap" int: 0;
value "compositing" int: 1;
value "scroll_smooth_history_weight" double: 0.1;
value "scroll_smooth_future_time" double: 0.0;
value "scroll_smooth_time_window" double: 0.01;
+ value "focus_auto_scroll_bring_in_enable" uchar: 0;
value "scale" double: 1.0;
value "bgpixmap" int: 0;
value "compositing" int: 1;
value "scroll_smooth_history_weight" double: 0.1;
value "scroll_smooth_future_time" double: 0.0;
value "scroll_smooth_time_window" double: 0.01;
+ value "focus_auto_scroll_bring_in_enable" uchar: 0;
value "scale" double: 1.0;
value "bgpixmap" int: 0;
value "compositing" int: 1;
}
static void
+_test_gengrid_focus_bring_in_changed(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
_grid_reorder_mode(void *data, Evas_Object *obj,
void *event_info EINA_UNUSED)
{
elm_box_pack_end(bx_opt, ck);
evas_object_show(ck);
+ ck = elm_check_add(bx_opt);
+ 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", _test_gengrid_focus_bring_in_changed,
+ NULL);
+ elm_check_state_set(ck, elm_config_focus_auto_scroll_bring_in_enabled_get());
+ elm_box_pack_end(bx_opt, ck);
+ evas_object_show(ck);
+
//Focus movement policy
fr = elm_frame_add(bx);
elm_object_text_set(fr, "Focus Movement Policy");
printf("Button clicked: %s\n", (char *)data);
}
+static void
+_test_genlist_focus_bring_in_changed(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));
+}
+
void
test_genlist_focus(void *data EINA_UNUSED,
Evas_Object *obj EINA_UNUSED,
elm_box_pack_end(bx_opt, chk);
evas_object_show(chk);
+ chk = elm_check_add(bx_opt);
+ elm_object_text_set(chk, "Focus Auto scroll bring in enable");
+ evas_object_size_hint_weight_set(chk, EVAS_HINT_EXPAND, 0.0);
+ evas_object_smart_callback_add(chk, "changed", _test_genlist_focus_bring_in_changed,
+ NULL);
+ elm_check_state_set(chk, elm_config_focus_auto_scroll_bring_in_enabled_get());
+ elm_box_pack_end(bx_opt, chk);
+ evas_object_show(chk);
+
// Focus Movement Policy
fr = elm_frame_add(bx);
elm_object_text_set(fr, "Focus Movement Policy");
}
static void
+_test_list_focus_bring_in_changed(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
_test_list_focus(const char *name, const char *title, Eina_Bool horiz)
{
Evas_Object *win, *li, *btn, *bx, *bx2, *fr, *bx_opt, *chk, *bx_btn;
elm_box_pack_end(bx_opt, chk);
evas_object_show(chk);
+ chk = elm_check_add(bx_opt);
+ elm_object_text_set(chk, "Focus Auto scroll bring in enable");
+ evas_object_size_hint_weight_set(chk, EVAS_HINT_EXPAND, 0.0);
+ evas_object_smart_callback_add(chk, "changed", _test_list_focus_bring_in_changed,
+ NULL);
+ elm_check_state_set(chk, elm_config_focus_auto_scroll_bring_in_enabled_get());
+ elm_box_pack_end(bx_opt, chk);
+ evas_object_show(chk);
+
// Focus Movement Policy
fr = elm_frame_add(bx);
elm_object_text_set(fr, "Focus Movement Policy");
elm_config_focus_move_policy_set(ELM_FOCUS_MOVE_POLICY_IN);
}
+static void
+_test_toolbar_focus_bring_in_changed(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));
+}
+
void
test_toolbar_focus(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
evas_object_smart_callback_add(chk, "changed",
_test_toolbar_focus_focus_animate_check_changed,
win);
+
+ chk = elm_check_add(bx_opt);
+ elm_object_text_set(chk, "Focus Auto scroll bring in enable");
+ evas_object_size_hint_weight_set(chk, EVAS_HINT_EXPAND, 0.0);
+ evas_object_smart_callback_add(chk, "changed", _test_toolbar_focus_bring_in_changed,
+ NULL);
+ elm_check_state_set(chk, elm_config_focus_auto_scroll_bring_in_enabled_get());
+ elm_box_pack_end(bx_opt, chk);
+ evas_object_show(chk);
+
// Focus movement policy
fr = elm_frame_add(bx);
elm_object_text_set(fr, "Focus Movement Policy");
ELM_CONFIG_VAL(D, T, scroll_smooth_history_weight, T_DOUBLE);
ELM_CONFIG_VAL(D, T, scroll_smooth_future_time, T_DOUBLE);
ELM_CONFIG_VAL(D, T, scroll_smooth_time_window, T_DOUBLE);
+ ELM_CONFIG_VAL(D, T, focus_auto_scroll_bring_in_enable, T_UCHAR);
ELM_CONFIG_VAL(D, T, scale, T_DOUBLE);
ELM_CONFIG_VAL(D, T, bgpixmap, T_INT);
ELM_CONFIG_VAL(D, T, compositing, T_INT);
if (s) _elm_config->scroll_smooth_future_time = _elm_atof(s);
s = getenv("ELM_SCROLL_SMOOTH_TIME_WINDOW");
if (s) _elm_config->scroll_smooth_time_window = _elm_atof(s);
+ s = getenv("ELM_FOCUS_AUTO_SCROLL_BRING_IN_ENABLE");
+ if (s) _elm_config->focus_auto_scroll_bring_in_enable = !!atoi(s);
+
s = getenv("ELM_THEME");
if (s) eina_stringshare_replace(&_elm_config->theme, s);
_elm_config->thumbscroll_acceleration_weight = weight;
}
+EAPI Eina_Bool
+elm_config_focus_auto_scroll_bring_in_enabled_get(void)
+{
+ return _elm_config->focus_auto_scroll_bring_in_enable;
+}
+
+EAPI void
+elm_config_focus_auto_scroll_bring_in_enabled_set(Eina_Bool enabled)
+{
+ _elm_config->focus_auto_scroll_bring_in_enable = !!enabled;
+}
+
EAPI void
elm_config_longpress_timeout_set(double longpress_timeout)
{
EAPI void elm_config_scroll_thumbscroll_acceleration_weight_set(double weight);
/**
+ * Get enable status of focus auto scroll bring in.
+ *
+ * @see elm_config_focus_auto_scroll_bring_in_enabled_set()
+ * @ingroup Focus
+ * @since 1.10
+ */
+EAPI Eina_Bool elm_config_focus_auto_scroll_bring_in_enabled_get(void);
+
+/**
+ * Set enable status of focus auto scroll bring in.
+ *
+ * @param enabled enable scroll bring in if @c EINA_TRUE, disable otherwise
+ *
+ * @see elm_config_focus_auto_scroll_bring_in_enabled_get()
+ * @ingroup Focus
+ * @since 1.10
+ */
+EAPI void elm_config_focus_auto_scroll_bring_in_enabled_set(Eina_Bool enabled);
+
+/**
* @}
*/
(elm_widget_item_disabled_get(it)))
return;
- elm_gengrid_item_show
- ((Elm_Object_Item *)it, ELM_GENGRID_ITEM_SCROLLTO_IN);
+ if (!_elm_config->focus_auto_scroll_bring_in_enable)
+ elm_gengrid_item_show
+ ((Elm_Object_Item *)it, ELM_GENGRID_ITEM_SCROLLTO_IN);
+ else
+ elm_gengrid_item_bring_in
+ ((Elm_Object_Item *)it, ELM_GENGRID_ITEM_SCROLLTO_IN);
sd->focused_item = (Elm_Object_Item *)it;
if (elm_widget_focus_highlight_enabled_get(obj))
(elm_widget_item_disabled_get(it)))
return;
- elm_genlist_item_show((Elm_Object_Item *)it, ELM_GENLIST_ITEM_SCROLLTO_IN);
+ if (!_elm_config->focus_auto_scroll_bring_in_enable)
+ elm_genlist_item_show((Elm_Object_Item *)it,
+ ELM_GENLIST_ITEM_SCROLLTO_IN);
+ else
+ elm_genlist_item_bring_in((Elm_Object_Item *)it,
+ ELM_GENLIST_ITEM_SCROLLTO_IN);
sd->focused_item = (Elm_Object_Item *)it;
if (elm_widget_focus_highlight_enabled_get(obj))
evas_object_geometry_get(VIEW(it), &x, &y, &w, &h);
evas_object_geometry_get(sd->hit_rect, &sx, &sy, &sw, &sh);
if ((x < sx) || (y < sy)|| ((x + w) > (sx + sw)) || ((y + h) > (sy + sh)))
- elm_list_item_show((Elm_Object_Item *)it);
+ {
+ if (!_elm_config->focus_auto_scroll_bring_in_enable)
+ elm_list_item_show((Elm_Object_Item *)it);
+ else
+ elm_list_item_bring_in((Elm_Object_Item *)it);
+ }
sd->focused_item = (Elm_Object_Item *)it;
if (elm_widget_focus_highlight_enabled_get(WIDGET(it)))
{
unsigned char focus_highlight_clip_disable; /**< This shows disabled status of focus highlight clip feature. This value is false by default so the focus highlight is clipped. */
unsigned char focus_move_policy; /**< This show how the elementary focus is moved to another object. Focus can be moved by click or mouse_in. */
unsigned char item_select_on_focus_disable; /**< This shows the disabled status of select on focus feature. This value is false by default so that select on focus feature is enabled by default.*/
+ unsigned char focus_auto_scroll_bring_in_enable; /**< This shows the enabled status of focus auto scroll bring in feature. This is disabled by default.*/
int toolbar_shrink_mode;
unsigned char fileselector_expand_enable;
unsigned char fileselector_double_tap_navigation_enable;
return;
sd->focused_item = it;
- elm_toolbar_item_show((Elm_Object_Item *)it, ELM_TOOLBAR_ITEM_SCROLLTO_IN);
+ if (!_elm_config->focus_auto_scroll_bring_in_enable)
+ elm_toolbar_item_show((Elm_Object_Item *)it,
+ ELM_TOOLBAR_ITEM_SCROLLTO_IN);
+ else
+ elm_toolbar_item_bring_in((Elm_Object_Item *)it,
+ ELM_TOOLBAR_ITEM_SCROLLTO_IN);
if (elm_widget_focus_highlight_enabled_get(obj))
{
edje_object_signal_emit