summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorindefini <chris@indefini.org>2015-11-23 16:44:57 +0000
committerTom Hacohen <tom@stosb.com>2015-11-23 16:44:57 +0000
commit53b172ef039a2da04aa3b28283f5935e320fe5bc (patch)
tree08ca3f9b3dd5727d0ef2628a5f78bae6ed308137
parenta21a8181c2fa4f43e17eb30178b386208eb7d9f5 (diff)
downloadelementary-53b172ef039a2da04aa3b28283f5935e320fe5bc.tar.gz
Entry focus region : if single line, show the whole object.
Summary: If the entry is a single line, rather than return the cursor height, it is better to return the height of the object. Reviewers: herdsman, tasn Differential Revision: https://phab.enlightenment.org/D3169
-rw-r--r--src/lib/elm_entry.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index c1984a865..147a80900 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -1185,6 +1185,13 @@ _elm_entry_elm_widget_on_focus_region(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd, E
{
edje_object_part_text_cursor_geometry_get
(sd->entry_edje, "elm.text", x, y, w, h);
+
+ if (sd->single_line)
+ {
+ evas_object_geometry_get(sd->entry_edje, NULL, NULL, NULL, h);
+ if (y) *y = 0;
+ }
+
return EINA_TRUE;
}