summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBowon Ryu <bowon.ryu@samsung.com>2020-04-06 06:40:35 +0000
committerStefan Schmidt <s.schmidt@samsung.com>2020-04-17 11:53:50 +0200
commit62b4e2a2da911aba45505966686c8424d380eb26 (patch)
treee83bcee20c9c35fbb3542cb9e333f0cd8e111c7a
parente2365a0ed326e9c82301eb8036207f1632a6214e (diff)
edje: fix cursor scrolling
If there is a string larger than the size of entry and when the entry is auto scrolling, cursor is not visible. Using _edje_entry_cursor_geometry_get guarantees the minimum size of the cursor, and guarantee the size from edje. (min_restricted_calc) Reviewed-by: Ali Alzyod <ali198724@gmail.com> Differential Revision: https://phab.enlightenment.org/D11649
-rw-r--r--src/lib/edje/edje_legacy.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/edje/edje_legacy.c b/src/lib/edje/edje_legacy.c
index 76a258c461..414de4f982 100644
--- a/src/lib/edje/edje_legacy.c
+++ b/src/lib/edje/edje_legacy.c
@@ -384,8 +384,12 @@ EAPI void
384edje_object_part_text_cursor_geometry_get(const Edje_Object *obj, const char * part EINA_UNUSED, int *x, int *y, int *w, int *h) 384edje_object_part_text_cursor_geometry_get(const Edje_Object *obj, const char * part EINA_UNUSED, int *x, int *y, int *w, int *h)
385{ 385{
386 GET_REAL_PART_ON_FAIL_RETURN() 386 GET_REAL_PART_ON_FAIL_RETURN()
387 evas_textblock_cursor_geometry_bidi_get(_edje_text_cursor_get(rp, EDJE_CURSOR_MAIN), 387 if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
388 x, y, w, h, NULL, NULL, NULL, NULL, EVAS_TEXTBLOCK_CURSOR_BEFORE); 388 {
389 _edje_entry_cursor_geometry_get(rp, x, y, w, h, NULL);
390 if (x) *x -= ed->x;
391 if (y) *y -= ed->y;
392 }
389} 393}
390 394
391EAPI Eina_Bool 395EAPI Eina_Bool