forked from enlightenment/efl
elm_entry: fix magnifier not showing up.
The swallow part was properly renamed and namespaced, so reflect that in the code. Also force a edje object recalc before moving the magnifier. Reviewers: raster, cedric, Hermet, tasn Reviewed By: cedric CC: seoz Differential Revision: https://phab.enlightenment.org/D286 Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
This commit is contained in:
parent
475e48bc7c
commit
45dd27d9ac
|
@ -1724,6 +1724,10 @@
|
||||||
|
|
||||||
* spinner: added signals "spinner,drag,start" and "spinner,drag,stop".
|
* spinner: added signals "spinner,drag,start" and "spinner,drag,stop".
|
||||||
|
|
||||||
|
2013-10-27 Thiep Ha
|
||||||
|
|
||||||
|
* entry: Correct magnifier showing.
|
||||||
|
|
||||||
2013-10-30 Amitesh Singh (_ami_)
|
2013-10-30 Amitesh Singh (_ami_)
|
||||||
|
|
||||||
* image: Add support for "clicked" callback on Return/space/KP_Enter key press.
|
* image: Add support for "clicked" callback on Return/space/KP_Enter key press.
|
||||||
|
|
|
@ -957,6 +957,7 @@ group { name: "elm/entry/magnifier/default";
|
||||||
scale: 1;
|
scale: 1;
|
||||||
description { state: "default" 0.0;
|
description { state: "default" 0.0;
|
||||||
min: 128 64;
|
min: 128 64;
|
||||||
|
align: 0 0;
|
||||||
image.normal: "frame_rounded.png";
|
image.normal: "frame_rounded.png";
|
||||||
image.border: 14 14 14 14;
|
image.border: 14 14 14 14;
|
||||||
image.middle: 0;
|
image.middle: 0;
|
||||||
|
|
|
@ -1372,15 +1372,14 @@ _magnifier_move(void *data, Evas_Coord px, Evas_Coord py)
|
||||||
Evas_Coord x, y, w, h;
|
Evas_Coord x, y, w, h;
|
||||||
Evas_Coord ex, ey;
|
Evas_Coord ex, ey;
|
||||||
Evas_Coord sx, sy;
|
Evas_Coord sx, sy;
|
||||||
const Evas_Object *obj_bg;
|
const Evas_Object *obj_content;
|
||||||
double scale = _elm_config->magnifier_scale;
|
double scale = _elm_config->magnifier_scale;
|
||||||
|
|
||||||
obj_bg = edje_object_part_object_get(sd->mgf_bg, "bg");
|
edje_object_parts_extends_calc(sd->mgf_bg, &x, &y, &w, &h);
|
||||||
evas_object_geometry_get(obj_bg, NULL, NULL, &w, &h);
|
evas_object_move(sd->mgf_bg, px - x - w/2, py - y - h);
|
||||||
evas_object_move(sd->mgf_bg, px - w/2, py - h);
|
|
||||||
|
|
||||||
obj_bg = edje_object_part_object_get(sd->mgf_bg, "swallow");
|
obj_content = edje_object_part_object_get(sd->mgf_bg, "elm.swallow.content");
|
||||||
evas_object_geometry_get(obj_bg, &x, &y, &w, &h);
|
evas_object_geometry_get(obj_content, &x, &y, &w, &h);
|
||||||
sx = px - (x + w/2);
|
sx = px - (x + w/2);
|
||||||
sy = py - (y + h/2);
|
sy = py - (y + h/2);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue