forked from enlightenment/efl
[elm] Unb0rk flip selector.
Patch by me and Ingvaldur Sigurjonsson (thanks for working on the issue exactly when I tackled it :)). SVN revision: 72885
This commit is contained in:
parent
d78b70af51
commit
ece6378d0c
|
@ -53,7 +53,7 @@ struct _Elm_Flipselector_Smart_Data
|
|||
double interval, first_interval;
|
||||
|
||||
int walking;
|
||||
Eina_Bool evaling : 1;
|
||||
Eina_Bool evaluating : 1;
|
||||
};
|
||||
|
||||
#define ELM_FLIPSELECTOR_DATA_GET(o, sd) \
|
||||
|
@ -114,11 +114,11 @@ _elm_flipselector_smart_sizing_eval(Evas_Object *obj)
|
|||
|
||||
ELM_FLIPSELECTOR_DATA_GET(obj, sd);
|
||||
|
||||
if (sd->evaluating) return;
|
||||
|
||||
elm_coords_finger_size_adjust(1, &minw, 2, &minh);
|
||||
|
||||
if (sd->evaling)
|
||||
{
|
||||
sd->evaling = EINA_TRUE;
|
||||
sd->evaluating = EINA_TRUE;
|
||||
|
||||
if (sd->sentinel)
|
||||
{
|
||||
|
@ -142,8 +142,7 @@ _elm_flipselector_smart_sizing_eval(Evas_Object *obj)
|
|||
if (w > minw) minw = w;
|
||||
if (h > minh) minh = h;
|
||||
|
||||
sd->evaling = EINA_FALSE;
|
||||
}
|
||||
sd->evaluating = EINA_FALSE;
|
||||
|
||||
evas_object_size_hint_min_set(obj, minw, minh);
|
||||
}
|
||||
|
@ -621,6 +620,7 @@ _elm_flipselector_smart_add(Evas_Object *obj)
|
|||
(obj, "elm,action,down,stop", "", _signal_val_change_stop, obj);
|
||||
|
||||
priv->first_interval = FLIP_FIRST_INTERVAL;
|
||||
priv->evaluating = EINA_FALSE;
|
||||
|
||||
elm_widget_can_focus_set(obj, EINA_TRUE);
|
||||
|
||||
|
@ -735,7 +735,7 @@ elm_flipselector_item_append(Evas_Object *obj,
|
|||
elm_layout_sizing_eval(obj);
|
||||
}
|
||||
|
||||
if (eina_list_count(sd->items) >= 2)
|
||||
if (eina_list_count(sd->items) > 1)
|
||||
elm_layout_signal_emit(obj, "elm,state,button,visible", "elm");
|
||||
|
||||
return (Elm_Object_Item *)item;
|
||||
|
|
Loading…
Reference in New Issue