summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_win.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-08-29 15:59:40 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-08-29 16:22:47 +0900
commit8c1f771a67d37f560067d75cc0485f486ad42733 (patch)
treee2cc40d9750a1b77c969bb6e4bd0d663b29e4df6 /src/lib/elementary/efl_ui_win.c
parentc6c1751fe3b8d2a208803e6f7dd786fab68f4b15 (diff)
widget: Use rectangle for focus_hilight
Ref T5363
Diffstat (limited to '')
-rw-r--r--src/lib/elementary/efl_ui_win.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index dafdb09d48..b5a64ddd21 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -1040,31 +1040,30 @@ static void
1040_elm_win_focus_highlight_anim_setup(Efl_Ui_Win_Data *sd, 1040_elm_win_focus_highlight_anim_setup(Efl_Ui_Win_Data *sd,
1041 Evas_Object *obj) 1041 Evas_Object *obj)
1042{ 1042{
1043 Evas_Coord tx, ty, tw, th; 1043 Eina_Rectangle rt;
1044 Evas_Coord px, py, pw, ph; 1044 Evas_Coord px, py, pw, ph;
1045 Edje_Message_Int_Set *m; 1045 Edje_Message_Int_Set *m;
1046 Evas_Object *target = sd->focus_highlight.cur.target; 1046 Evas_Object *target = sd->focus_highlight.cur.target;
1047 1047
1048 evas_object_geometry_get(obj, &px, &py, &pw, &ph); 1048 evas_object_geometry_get(obj, &px, &py, &pw, &ph);
1049 elm_widget_focus_highlight_geometry_get(target, &tx, &ty, &tw, &th); 1049 rt = elm_widget_focus_highlight_geometry_get(target);
1050 evas_object_move(obj, tx, ty); 1050 efl_gfx_geometry_set(obj, rt.x, rt.y, rt.w, rt.h);
1051 evas_object_resize(obj, tw, th);
1052 1051
1053 if ((px == tx) && (py == ty) && (pw == tw) && (ph == th)) return; 1052 if ((px == rt.x) && (py == rt.y) && (pw == rt.w) && (ph == rt.h)) return;
1054 1053
1055 if (!_elm_config->focus_highlight_clip_disable) 1054 if (!_elm_config->focus_highlight_clip_disable)
1056 evas_object_clip_unset(obj); 1055 evas_object_clip_unset(obj);
1057 1056
1058 m = alloca(sizeof(*m) + (sizeof(int) * 8)); 1057 m = alloca(sizeof(*m) + (sizeof(int) * 8));
1059 m->count = 8; 1058 m->count = 8;
1060 m->val[0] = px - tx; 1059 m->val[0] = px - rt.x;
1061 m->val[1] = py - ty; 1060 m->val[1] = py - rt.y;
1062 m->val[2] = pw; 1061 m->val[2] = pw;
1063 m->val[3] = ph; 1062 m->val[3] = ph;
1064 m->val[4] = 0; 1063 m->val[4] = 0;
1065 m->val[5] = 0; 1064 m->val[5] = 0;
1066 m->val[6] = tw; 1065 m->val[6] = rt.w;
1067 m->val[7] = th; 1066 m->val[7] = rt.h;
1068 edje_object_message_send(obj, EDJE_MESSAGE_INT_SET, 1, m); 1067 edje_object_message_send(obj, EDJE_MESSAGE_INT_SET, 1, m);
1069} 1068}
1070 1069
@@ -1073,12 +1072,10 @@ _elm_win_focus_highlight_simple_setup(Efl_Ui_Win_Data *sd,
1073 Evas_Object *obj) 1072 Evas_Object *obj)
1074{ 1073{
1075 Evas_Object *clip, *target = sd->focus_highlight.cur.target; 1074 Evas_Object *clip, *target = sd->focus_highlight.cur.target;
1076 Evas_Coord x, y, w, h; 1075 Eina_Rectangle r;
1077 1076
1078 elm_widget_focus_highlight_geometry_get(target, &x, &y, &w, &h); 1077 r = elm_widget_focus_highlight_geometry_get(target);
1079 1078 efl_gfx_geometry_set(obj, r.x, r.y, r.w, r.h);
1080 evas_object_move(obj, x, y);
1081 evas_object_resize(obj, w, h);
1082 1079
1083 if (!_elm_config->focus_highlight_clip_disable) 1080 if (!_elm_config->focus_highlight_clip_disable)
1084 { 1081 {