Page MenuHomePhabricator

Left Ellipsis behaves differently than Right Ellipsis and Cursor location changes incorrectly in some cases
Open, Incoming QueuePublic

Description

#include <Elementary.h>


EAPI_MAIN int
elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
{
   Evas_Object *win;

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
   win = elm_win_util_standard_add("ellipsis-test", "ellipsis-test");
   elm_win_autodel_set(win, EINA_TRUE);

   evas_object_resize(win, 320, 320);

   Evas_Object *box;
   box = elm_box_add(win);
   evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
   elm_win_resize_object_add(win, box);
 
   Evas_Object *entry;
   entry = elm_entry_add(box);
   elm_entry_text_style_user_push(entry, "DEFAULT='font_size=40 wrap=word ellipsis=0'");
   elm_entry_entry_set(entry, "<font='Arial'>Fellow</><font='Sans'> </><font='Arial'>Fellow</>");
   evas_object_resize(entry, 39,67);
   
   elm_entry_cursor_end_set(entry);
   Evas_Textblock_Cursor * cur = evas_object_textblock_cursor_get(elm_entry_textblock_get(entry));
   evas_textblock_cursor_word_start(cur);
   

   evas_object_size_hint_weight_set(entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, EVAS_HINT_FILL);

   elm_box_pack_end(box, entry);

   evas_object_show(entry);
   evas_object_show(box);
   evas_object_show(win);

   elm_run();
   return 0;
}
ELM_MAIN()

Sara created this task.Jul 22 2020, 6:21 AM
Sara added a comment.Jul 29 2020, 1:14 AM

Behavior in QT

Sara added a comment.Jul 29 2020, 3:32 AM

Behavior in Android