aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/elementary
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2016-07-28 15:18:07 +0530
committerAmitesh Singh <amitesh.sh@samsung.com>2016-07-28 15:22:07 +0530
commitba060fe93236da37e4c8bbd84c1bcf58e27979d6 (patch)
treeb34a8cca169d81a85c89aa0679fdf6c2a6f924a4 /src/lib/elementary
parentwin: Fix evas framespace under X (diff)
downloadefl-ba060fe93236da37e4c8bbd84c1bcf58e27979d6.tar.gz
entry: allow force recalc on "size,eval" "elm" signal
Summary: In some use cases, font (style) of elm.text in elm entry is changed on focus and unfocus. user must send "size,eval",elm signal to entry to force recalc, but this was not happening. This patch fixes that issue. fixes https://phab.enlightenment.org/T4233 Reviewers: tasn, herdsman, raster Subscribers: cedric, seoz, jpeg Maniphest Tasks: https://phab.enlightenment.org/T4233 Differential Revision: https://phab.enlightenment.org/D4196
Diffstat (limited to 'src/lib/elementary')
-rw-r--r--src/lib/elementary/elm_entry.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c
index 87c555f1b1..ead6be5b83 100644
--- a/src/lib/elementary/elm_entry.c
+++ b/src/lib/elementary/elm_entry.c
@@ -3625,6 +3625,15 @@ _end_handler_mouse_move_cb(void *data,
_magnifier_move(data);
}
+static void
+_entry_on_size_evaluate_signal(void *data,
+ Evas_Object *obj EINA_UNUSED,
+ const char *emission EINA_UNUSED,
+ const char *source EINA_UNUSED)
+{
+ elm_entry_calc_force(data);
+}
+
EOLIAN static void
_elm_entry_efl_canvas_group_group_add(Eo *obj, Elm_Entry_Data *priv)
{
@@ -3785,6 +3794,10 @@ _elm_entry_efl_canvas_group_group_add(Eo *obj, Elm_Entry_Data *priv)
if (_elm_config->desktop_entry)
priv->sel_handler_disabled = EINA_TRUE;
+
+ edje_object_signal_callback_add
+ (priv->entry_edje, "size,eval", "elm",
+ _entry_on_size_evaluate_signal, obj);
}
static void
@@ -3829,6 +3842,10 @@ _elm_entry_efl_canvas_group_group_del(Eo *obj, Elm_Entry_Data *sd)
if (sd->auto_save) _save_do(obj);
}
+ edje_object_signal_callback_del_full
+ (sd->entry_edje, "size,eval", "elm",
+ _entry_on_size_evaluate_signal, obj);
+
if (sd->scroll)
elm_interface_scrollable_content_viewport_resize_cb_set(obj, NULL);