summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hirt <daniel.hirt@samsung.com>2016-03-17 14:49:34 +0200
committerYoungbok Shin <youngb.shin@samsung.com>2016-03-22 14:29:49 +0900
commit931823d4d948be77faa1cc056671f6142cf44fee (patch)
treedeff44414b98bc9f58fb816160bb02f51ef6cdd3
parent76739f910f2b9573add39d74ea0a6e54878ddf06 (diff)
Entry: Fix line_wrap logic
Calling single_line_set caused line_wrap to change to ELM_WRAP_NONE. However, most of the logic prefers single_line over line_wrap e.g. when updating the style of the widget. A few other places were missing this check but that's pretty much it. This fixes the following sequence of calls: elm_entry_line_wrap_set(ELM_WRAP_WORD); elm_entry_single_line_set(EINA_TRUE); elm_entry_single_line_set(EINA_FALSE); @fix
-rw-r--r--src/lib/elm_entry.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index b2af8a45b..12b00199a 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -957,7 +957,7 @@ _entry_sizing_eval(Eo *obj, Elm_Entry_Data *sd)
957 957
958 evas_object_geometry_get(obj, NULL, NULL, &resw, &resh); 958 evas_object_geometry_get(obj, NULL, NULL, &resw, &resh);
959 959
960 if (sd->line_wrap) 960 if (!sd->single_line && sd->line_wrap)
961 { 961 {
962 if ((resw == sd->last_w) && (!sd->changed)) 962 if ((resw == sd->last_w) && (!sd->changed))
963 { 963 {
@@ -3279,7 +3279,7 @@ _elm_entry_resize_internal(Evas_Object *obj)
3279{ 3279{
3280 ELM_ENTRY_DATA_GET(obj, sd); 3280 ELM_ENTRY_DATA_GET(obj, sd);
3281 3281
3282 if (sd->line_wrap) 3282 if (!sd->single_line && sd->line_wrap)
3283 { 3283 {
3284 elm_layout_sizing_eval(obj); 3284 elm_layout_sizing_eval(obj);
3285 } 3285 }
@@ -3897,7 +3897,6 @@ _elm_entry_single_line_set(Eo *obj, Elm_Entry_Data *sd, Eina_Bool single_line)
3897 if (sd->single_line == single_line) return; 3897 if (sd->single_line == single_line) return;
3898 3898
3899 sd->single_line = single_line; 3899 sd->single_line = single_line;
3900 sd->line_wrap = ELM_WRAP_NONE;
3901 if (elm_entry_cnp_mode_get(obj) == ELM_CNP_MODE_MARKUP) 3900 if (elm_entry_cnp_mode_get(obj) == ELM_CNP_MODE_MARKUP)
3902 elm_entry_cnp_mode_set(obj, ELM_CNP_MODE_NO_IMAGE); 3901 elm_entry_cnp_mode_set(obj, ELM_CNP_MODE_NO_IMAGE);
3903 if (sd->single_line) 3902 if (sd->single_line)
@@ -3945,7 +3944,6 @@ _elm_entry_password_set(Eo *obj, Elm_Entry_Data *sd, Eina_Bool password)
3945 if (password) 3944 if (password)
3946 { 3945 {
3947 sd->single_line = EINA_TRUE; 3946 sd->single_line = EINA_TRUE;
3948 sd->line_wrap = ELM_WRAP_NONE;
3949 elm_entry_input_hint_set(obj, ((sd->input_hints & ~ELM_INPUT_HINT_AUTO_COMPLETE) | ELM_INPUT_HINT_SENSITIVE_DATA)); 3947 elm_entry_input_hint_set(obj, ((sd->input_hints & ~ELM_INPUT_HINT_AUTO_COMPLETE) | ELM_INPUT_HINT_SENSITIVE_DATA));
3950 _entry_selection_callbacks_unregister(obj); 3948 _entry_selection_callbacks_unregister(obj);
3951 elm_interface_atspi_accessible_role_set(obj, ELM_ATSPI_ROLE_PASSWORD_TEXT); 3949 elm_interface_atspi_accessible_role_set(obj, ELM_ATSPI_ROLE_PASSWORD_TEXT);