diff options
author | indefini <chris@indefini.org> | 2015-11-23 16:44:57 +0000 |
---|---|---|
committer | Tom Hacohen <tom@stosb.com> | 2015-11-23 16:44:57 +0000 |
commit | 53b172ef039a2da04aa3b28283f5935e320fe5bc (patch) | |
tree | 08ca3f9b3dd5727d0ef2628a5f78bae6ed308137 | |
parent | a21a8181c2fa4f43e17eb30178b386208eb7d9f5 (diff) | |
download | elementary-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.c | 7 |
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; } |