forked from enlightenment/efl
elm_index: set selected item active in smart theme
This patch sets selected item's state active when theme is changed.
This commit is contained in:
parent
40cef9090f
commit
ae4a102102
|
@ -1080,3 +1080,7 @@
|
|||
|
||||
* Fix the standard of scrollbar-calculation from the scroller's x to pan's x.
|
||||
The scrollbar have to sync with pan. if not, the scrollbar doesn't move even if the position of content moves.
|
||||
|
||||
2013-03-04 Jaeun Choi
|
||||
|
||||
* Fix elm_index to send a signal to the selected item in smart theme.
|
||||
|
|
|
@ -164,6 +164,7 @@ Fixes:
|
|||
* Fix scroller acceleration bug. It was accelerated even it's scrolled after finishing the previous scroll. This happens with page scroll enabled.
|
||||
* Fix 1byte invalid read & do memset, rewind if needed.
|
||||
* Fix the standard of scrollbar-calculation from the scroller's x to pan's x.
|
||||
* Fix elm_index to send a signal to the selected item in smart theme.
|
||||
|
||||
Removals:
|
||||
|
||||
|
|
|
@ -316,6 +316,8 @@ static void
|
|||
_elm_index_smart_theme(Eo *obj, void *_pd, va_list *list)
|
||||
{
|
||||
Evas_Coord minw = 0, minh = 0;
|
||||
Elm_Index_Item *it;
|
||||
|
||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
if (ret) *ret = EINA_FALSE;
|
||||
Eina_Bool int_ret = EINA_FALSE;
|
||||
|
@ -385,6 +387,15 @@ _elm_index_smart_theme(Eo *obj, void *_pd, va_list *list)
|
|||
}
|
||||
else elm_layout_signal_emit(obj, "elm,state,inactive", "elm");
|
||||
|
||||
it = (Elm_Index_Item *)elm_index_selected_item_get(obj, sd->level);
|
||||
if (it)
|
||||
{
|
||||
if (it->head)
|
||||
edje_object_signal_emit(VIEW(it->head), "elm,state,active", "elm");
|
||||
else
|
||||
edje_object_signal_emit(VIEW(it), "elm,state,active", "elm");
|
||||
}
|
||||
|
||||
if (ret) *ret = EINA_TRUE;
|
||||
}
|
||||
|
||||
|
@ -863,21 +874,18 @@ _index_resize_cb(void *data,
|
|||
|
||||
if (!sd->omit_enabled) return;
|
||||
|
||||
Eina_List *l;
|
||||
Elm_Index_Item *it;
|
||||
|
||||
_index_box_clear(data, sd->bx[0], 0);
|
||||
_index_box_auto_fill(data, sd->bx[0], 0);
|
||||
|
||||
EINA_LIST_FOREACH(sd->items, l, it)
|
||||
it = (Elm_Index_Item *)elm_index_selected_item_get(obj, sd->level);
|
||||
if (it)
|
||||
{
|
||||
if (it->selected)
|
||||
{
|
||||
if (it->head)
|
||||
edje_object_signal_emit(VIEW(it->head), "elm,state,active", "elm");
|
||||
else
|
||||
edje_object_signal_emit(VIEW(it), "elm,state,active", "elm");
|
||||
}
|
||||
if (it->head)
|
||||
edje_object_signal_emit(VIEW(it->head), "elm,state,active", "elm");
|
||||
else
|
||||
edje_object_signal_emit(VIEW(it), "elm,state,active", "elm");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue