forked from enlightenment/efl
edje: Edje_Edit - fix edje_edit_state_aspect_pref_set() function to setup Source and None aspect preferences
Summary: This commit fixes check of passed value of aspect preference in edje_edit_state_aspect_pref_set() because it ignores None and Sorce values. @fix Reviewers: reutskiy.v.v, Hermet, raster, cedric Reviewed By: cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1542 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
parent
e6722b6ab3
commit
f8db9a85fb
|
@ -3070,14 +3070,22 @@ EAPI Eina_Bool edje_edit_state_aspect_max_set(Evas_Object *obj, const char *part
|
|||
EAPI unsigned char edje_edit_state_aspect_pref_get(Evas_Object *obj, const char *part, const char *state, double value);
|
||||
|
||||
/** Set the aspect preference of a part state.
|
||||
*
|
||||
* The available values of aspect preference are:
|
||||
* <ul style="list-style-type:none">
|
||||
* <li>0 - None</li>
|
||||
* <li>1 - Vertical</li>
|
||||
* <li>2 - Horizontal</li>
|
||||
* <li>3 - Both</li>
|
||||
* <li>4 - Source</li>
|
||||
* </ul>
|
||||
*
|
||||
* @param obj Object being edited.
|
||||
* @param part Part that contain state.
|
||||
* @param state The name of the state to set aspect preference (not
|
||||
* including the state value).
|
||||
* @param value The state value.
|
||||
* @param pref The aspect preference to set (0 = None, 1 = Vertical, 2
|
||||
* = Horizontal, 3 = Both)
|
||||
* @param pref The aspect preference to be set
|
||||
*
|
||||
* @return @c EINA_TRUE if the parameter was found, @c EINA_FALSE otherwise.
|
||||
*/
|
||||
|
|
|
@ -5702,7 +5702,7 @@ EAPI Eina_Bool
|
|||
edje_edit_state_aspect_pref_set(Evas_Object *obj, const char *part, const char *state, double value, unsigned char pref)
|
||||
{
|
||||
GET_PD_OR_RETURN(EINA_FALSE);
|
||||
if ((!pref) || (pref > 3)) return EINA_FALSE;
|
||||
if (pref > 4) return EINA_FALSE;
|
||||
pd->aspect.prefer = pref;
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue