aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/e_widget_label.c
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-01-15 12:03:28 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-01-15 12:13:53 +0900
commit3ea6a3569d6294cd5367a3795bd0c9e8ec5c3a29 (patch)
tree7dfc23386fd0caa6564dca3dfd3ec36c8e31a44e /src/bin/e_widget_label.c
parentconvert e_conf to use elm_layout for min sizing updates (diff)
downloadenlightenment-3ea6a3569d6294cd5367a3795bd0c9e8ec5c3a29.tar.gz
revert all the ui breakes in e - going the wrong direction in the
first place anyway. shoudl replace the entire dialgo one at a time by an elm version not try and stuff elm widgets into where e widgets used to be. this doesnt improve e's config dialogs, just makes them buggy as all hell in the name of a move to elm. Revert "e_widget_button -> elm_button conversion" This reverts commit b1c976d80d282d02832e8951d9e3c3fe113871fc. Revert "update widget size hints when setting a resize object" This reverts commit fdab0218b264d143c960aad806e3a4ff0ee20678. Revert "remove no-longer-necessary size hinting in list widgets" This reverts commit 21479f50192fb5a9c4204a90e1fe1e93a33a5e9e. Revert "e_widget_textblock -> elm_entry conversion" This reverts commit 8fe2f00f75068ccc03432ea43ba9fb13aed7dada. Revert "e frame -> elm_frame conversion" This reverts commit e9da6a02fc18cb6edc41633a2dfc688891a51764. Revert "remove unnecessary size hinting" This reverts commit b596623efd8a46d232ade1942c6638b3641013d1. Revert "e_label -> elm_label conversion" This reverts commit 049b31867912865e1357c83122c7419c09f4bb80. Revert "set evas size hint min in widget min size" This reverts commit 2f09aa2fda3ee06aae33af53f255c0eab770b57e. Revert "e_table -> elm_table conversion" This reverts commit 643401298201db2eea3c99e0ad725b016362fc49. Revert "remove unused vars" This reverts commit b19e706b23c0890312f2fc3bb1665a0eb4aab9e6.
Diffstat (limited to 'src/bin/e_widget_label.c')
-rw-r--r--src/bin/e_widget_label.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/bin/e_widget_label.c b/src/bin/e_widget_label.c
index 3dc4acec1..cf6dd444b 100644
--- a/src/bin/e_widget_label.c
+++ b/src/bin/e_widget_label.c
@@ -22,6 +22,7 @@ EAPI Evas_Object *
e_widget_label_add(Evas *evas, const char *label)
{
Evas_Object *obj, *o;
+ Evas_Coord mw, mh;
E_Widget_Data *wd;
obj = e_widget_add(evas);
@@ -30,13 +31,17 @@ e_widget_label_add(Evas *evas, const char *label)
wd = calloc(1, sizeof(E_Widget_Data));
e_widget_data_set(obj, wd);
- o = elm_label_add(e_win_evas_win_get(evas));
+ o = edje_object_add(evas);
+ e_theme_edje_object_set(o, "base/theme/widgets",
+ "e/widgets/label");
wd->text = o;
+ edje_object_part_text_set(o, "e.text.label", label);
evas_object_show(o);
+ edje_object_size_min_calc(o, &mw, &mh);
e_widget_can_focus_set(obj, 0);
+ e_widget_size_min_set(obj, mw, mh);
e_widget_sub_object_add(obj, o);
e_widget_resize_object_set(obj, o);
- elm_object_text_set(o, label);
return obj;
}
@@ -51,9 +56,13 @@ EAPI void
e_widget_label_text_set(Evas_Object *obj, const char *text)
{
E_Widget_Data *wd;
+ Evas_Coord mw, mh;
wd = e_widget_data_get(obj);
- elm_object_text_set(wd->text, text);
+ edje_object_part_text_set(wd->text, "e.text.label", text);
+ edje_object_size_min_calc(wd->text, &mw, &mh);
+ evas_object_size_hint_min_set(wd->text, mw, mh);
+ e_widget_size_min_set(obj, mw, mh);
}
static void
@@ -71,6 +80,9 @@ _e_wid_disable_hook(Evas_Object *obj)
E_Widget_Data *wd;
wd = e_widget_data_get(obj);
- elm_object_disabled_set(wd->text, e_widget_disabled_get(obj));
+ if (e_widget_disabled_get(obj))
+ edje_object_signal_emit(wd->text, "e,state,disabled", "e");
+ else
+ edje_object_signal_emit(wd->text, "e,state,enabled", "e");
}