aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/elementary
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-07-20 14:24:23 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-07-20 14:24:23 +0900
commitb07b40cf4a0ce9de330561f2ddb3fc17576e8b6e (patch)
tree7ab5c30cb6a7b4303346511bfbad591063ce0e49 /src/lib/elementary
parentevas image updates - reduce overhead with bordered images not scaled (diff)
downloadefl-b07b40cf4a0ce9de330561f2ddb3fc17576e8b6e.tar.gz
elm flip - make it not crash and interactive mode work again
elm flip has been broken for a while - interactive mode was broken and it was causing crashes. this fixes that. @fix
Diffstat (limited to 'src/lib/elementary')
-rw-r--r--src/lib/elementary/efl_ui_flip.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/lib/elementary/efl_ui_flip.c b/src/lib/elementary/efl_ui_flip.c
index 5454778416..3a59663125 100644
--- a/src/lib/elementary/efl_ui_flip.c
+++ b/src/lib/elementary/efl_ui_flip.c
@@ -182,6 +182,7 @@ _efl_ui_flip_elm_widget_sub_object_add(Eo *obj, Efl_Ui_Flip_Data *_pd EINA_UNUSE
evas_object_smart_member_add(sobj, obj);
evas_object_event_callback_add
(sobj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints_cb, obj);
+ evas_object_lower(sobj);
return EINA_TRUE;
}
@@ -2007,13 +2008,22 @@ _efl_ui_flip_interaction_get(Eo *obj EINA_UNUSED, Efl_Ui_Flip_Data *sd)
return sd->intmode;
}
+static int
+_orient_dir_xlate(Efl_Orient dir)
+{
+ if (dir == EFL_ORIENT_UP) return ELM_FLIP_DIRECTION_UP;
+ else if (dir == EFL_ORIENT_DOWN) return ELM_FLIP_DIRECTION_DOWN;
+ else if (dir == EFL_ORIENT_LEFT) return ELM_FLIP_DIRECTION_LEFT;
+ else if (dir == EFL_ORIENT_RIGHT) return ELM_FLIP_DIRECTION_RIGHT;
+ return 0;
+}
+
EOLIAN static void
_efl_ui_flip_interaction_direction_enabled_set(Eo *obj, Efl_Ui_Flip_Data *sd, Efl_Orient dir, Eina_Bool enabled)
{
- int i = (int) dir;
+ int i = _orient_dir_xlate(dir);;
int area;
-
enabled = !!enabled;
if (sd->dir_enabled[i] == enabled) return;
sd->dir_enabled[i] = enabled;
@@ -2033,13 +2043,13 @@ _efl_ui_flip_interaction_direction_enabled_set(Eo *obj, Efl_Ui_Flip_Data *sd, Ef
EOLIAN static Eina_Bool
_efl_ui_flip_interaction_direction_enabled_get(Eo *obj EINA_UNUSED, Efl_Ui_Flip_Data *sd, Efl_Orient dir)
{
- return sd->dir_enabled[(int) dir];
+ return sd->dir_enabled[_orient_dir_xlate(dir)];
}
EOLIAN static void
_efl_ui_flip_interaction_direction_hitsize_set(Eo *obj, Efl_Ui_Flip_Data *sd, Efl_Orient dir, double hitsize)
{
- int i = (int) dir;
+ int i = _orient_dir_xlate(dir);
if (hitsize < 0.0)
@@ -2137,7 +2147,7 @@ _content_removed(Eo *obj, Efl_Ui_Flip_Data *pd, Efl_Gfx *content)
EOLIAN static double
_efl_ui_flip_interaction_direction_hitsize_get(Eo *obj EINA_UNUSED, Efl_Ui_Flip_Data *sd, Efl_Orient dir)
{
- int i = (int) dir;
+ int i = _orient_dir_xlate(dir);
return sd->dir_hitsize[i];
}