As widget and widget item can have different in_theme value (since
30cada369), we need to update in_theme value whenever the widget or
widget item get the focus.
Applied this logic to genlist, gengrid, toolbar first.
List focus is not working well at the moment.
This fixes small focus highlight on the left top corner of genlist
when the genlist scroller is clicked before the genlist is focused.
Special thanks to zmike for the report.
if (it->mouse_cursor)
elm_widget_item_cursor_set(it, it->mouse_cursor);
- _elm_widget_item_highlight_in_theme(WIDGET(it), (Elm_Object_Item *)it);
-
it->realized = EINA_TRUE;
it->want_unrealize = EINA_FALSE;
}
if (sd->focused_item)
_elm_gengrid_item_unfocused((Elm_Gen_Item *)sd->focused_item);
_elm_gengrid_item_focused((Elm_Gen_Item *)it);
+
+ _elm_widget_item_highlight_in_theme(obj, (Elm_Object_Item *)it);
+ _elm_widget_highlight_in_theme_update(obj);
_elm_widget_focus_highlight_start(obj);
}
}
if (it->decorate_it_set) _decorate_item_set(it);
- if (!calc)
- _elm_widget_item_highlight_in_theme(WIDGET(it), (Elm_Object_Item *)it);
-
edje_object_message_signal_process(VIEW(it));
}
if (sd->focused_item)
_elm_genlist_item_unfocused((Elm_Gen_Item *)sd->focused_item);
_elm_genlist_item_focused((Elm_Gen_Item *)it);
+
+ _elm_widget_item_highlight_in_theme(obj, (Elm_Object_Item *)it);
+ _elm_widget_highlight_in_theme_update(obj);
_elm_widget_focus_highlight_start(obj);
}
}
if (it)
_elm_toolbar_item_unfocused((Elm_Toolbar_Item *)it);
}
+
+ _elm_widget_item_highlight_in_theme(obj, (Elm_Object_Item *)it);
+ _elm_widget_highlight_in_theme_update(obj);
_elm_widget_focus_highlight_start(obj);
}
/* FIXME: if focused, it should switch from one mode to the other */
}
+void
+_elm_widget_highlight_in_theme_update(Eo *obj)
+{
+ Evas_Object *top = elm_widget_top_get(obj);
+
+ if (top && eo_isa(top, ELM_OBJ_WIN_CLASS))
+ {
+ _elm_win_focus_highlight_in_theme_update(
+ top, elm_widget_highlight_in_theme_get(obj));
+ }
+}
+
EOLIAN static Eina_Bool
_elm_widget_highlight_in_theme_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd)
{
const Eina_List *_elm_access_widget_item_access_order_get(const Elm_Widget_Item *item);
void _elm_access_widget_item_access_order_unset(Elm_Widget_Item *item);
void _elm_widget_focus_highlight_start(const Evas_Object *obj);
+void _elm_widget_highlight_in_theme_update(Eo *obj);
void _elm_win_focus_highlight_start(Evas_Object *obj);
+void _elm_win_focus_highlight_in_theme_update(Evas_Object *obj, Eina_Bool in_theme);
EAPI void _elm_access_clear(Elm_Access_Info *ac);
EAPI void _elm_access_text_set(Elm_Access_Info *ac, int type, const char *text);
}
void
+_elm_win_focus_highlight_in_theme_update(Evas_Object *obj, Eina_Bool in_theme)
+{
+ ELM_WIN_DATA_GET(obj, sd);
+ sd->focus_highlight.cur.in_theme = !!in_theme;
+}
+
+void
_elm_win_focus_highlight_start(Evas_Object *obj)
{
ELM_WIN_DATA_GET(obj, sd);