summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hirt <daniel.hirt@samsung.com>2016-03-17 15:10:08 +0200
committerDaniel Hirt <daniel.hirt@samsung.com>2016-03-20 11:10:05 +0200
commit7a6395ef4d86c1701b3deb259b660ad7c0dd4764 (patch)
treec71a1ae3b69502f85ec6d0558ec8fe968e21ed6c
parent8b6241b17d934a72604dde1e8a9dbaa149a9b50a (diff)
Label: Move theming to ctor
Following the previous change in Entry, theming is back to ctor. All calculations are deferred to entry's finalize().
-rw-r--r--src/lib/elm_label.c15
-rw-r--r--src/lib/elm_label.eo1
2 files changed, 2 insertions, 14 deletions
diff --git a/src/lib/elm_label.c b/src/lib/elm_label.c
index 122d12de1..763864ee9 100644
--- a/src/lib/elm_label.c
+++ b/src/lib/elm_label.c
@@ -325,21 +325,10 @@ _elm_label_eo_base_constructor(Eo *obj, Elm_Label_Data *_pd EINA_UNUSED)
325 evas_obj_smart_callbacks_descriptions_set(obj, _smart_callbacks); 325 evas_obj_smart_callbacks_descriptions_set(obj, _smart_callbacks);
326 elm_interface_atspi_accessible_role_set(obj, ELM_ATSPI_ROLE_LABEL); 326 elm_interface_atspi_accessible_role_set(obj, ELM_ATSPI_ROLE_LABEL);
327 327
328 return obj; 328 if (!elm_layout_theme_set(obj, "entry", "base-noedit", elm_widget_style_get(obj)))
329} 329 CRI("Failed to set layout!");
330
331EOLIAN static Eo *
332_elm_label_eo_base_finalize(Eo *obj, Elm_Label_Data *_pd EINA_UNUSED)
333{
334 /* FIXME: It should be called when eo_add() is called for
335 * improving performance. Elm label is singleline and non editable
336 * by default. The changing these properties not only change Edje,
337 * but also change flags inside of entry.
338 * So, we need to call entry APIs for changing its properties. */
339 elm_entry_editable_set(obj, EINA_FALSE);
340 elm_entry_single_line_set(obj, EINA_TRUE); 330 elm_entry_single_line_set(obj, EINA_TRUE);
341 331
342 elm_layout_sizing_eval(obj);
343 return obj; 332 return obj;
344} 333}
345 334
diff --git a/src/lib/elm_label.eo b/src/lib/elm_label.eo
index 969bbd2f1..c46bbd377 100644
--- a/src/lib/elm_label.eo
+++ b/src/lib/elm_label.eo
@@ -89,7 +89,6 @@ class Elm.Label (Elm.Entry)
89 implements { 89 implements {
90 class.constructor; 90 class.constructor;
91 Eo.Base.constructor; 91 Eo.Base.constructor;
92 Eo.Base.finalize;
93 Evas.Object_Smart.add; 92 Evas.Object_Smart.add;
94 Elm.Widget.focus_next_manager_is; 93 Elm.Widget.focus_next_manager_is;
95 Elm.Widget.focus_direction_manager_is; 94 Elm.Widget.focus_direction_manager_is;