aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Hirt <hirt.danny@gmail.com>2018-12-30 14:46:35 +0200
committerDaniel Hirt <hirt.danny@gmail.com>2018-12-30 15:37:15 +0200
commitd5546ade377f5e7199dfcc2852e47c572c4ddfb3 (patch)
tree95c65f85b596b2278fe4ad05ed124d93fd629b38
parentCanvas layout part text: update prop for underline height (diff)
downloadefl-devs/herdsman/staging.tar.gz
Ui layout part text: implement underline heightdevs/herdsman/staging
-rw-r--r--src/examples/elementary/efl_ui_layout_part_text_example.c2
-rw-r--r--src/lib/elementary/efl_ui_layout.c12
-rw-r--r--src/lib/elementary/efl_ui_layout_part_text.eo1
-rw-r--r--src/lib/elementary/elm_part_helper.h8
4 files changed, 22 insertions, 1 deletions
diff --git a/src/examples/elementary/efl_ui_layout_part_text_example.c b/src/examples/elementary/efl_ui_layout_part_text_example.c
index 2049c26920..96f1b6d6f5 100644
--- a/src/examples/elementary/efl_ui_layout_part_text_example.c
+++ b/src/examples/elementary/efl_ui_layout_part_text_example.c
@@ -60,9 +60,9 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
efl_text_underline_color_set(efl_part(custom_bt, "efl.text"), 0, 0, 0, 255);
efl_text_underline2_color_set(efl_part(custom_bt, "efl.text"), 0, 0, 0, 255);
efl_text_underline_dashed_color_set(efl_part(custom_bt, "efl.text"), 0, 0, 0, 255);
- efl_text_underline_type_set(efl_part(custom_bt, "efl.text"), EFL_TEXT_STYLE_UNDERLINE_TYPE_DASHED);
efl_text_underline_dashed_width_set(efl_part(custom_bt, "efl.text"), 10);
efl_text_underline_dashed_gap_set(efl_part(custom_bt, "efl.text"), 15);
+ efl_text_underline_height_set(efl_part(custom_bt, "efl.text"), 4.5);
efl_gfx_entity_size_set(win, EINA_SIZE2D(300, 320));
}
diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c
index 3175dfe905..eeea96d1a3 100644
--- a/src/lib/elementary/efl_ui_layout.c
+++ b/src/lib/elementary/efl_ui_layout.c
@@ -2679,6 +2679,17 @@ _efl_ui_layout_text_underline_dashed_gap_set(Eo *obj, Efl_Ui_Layout_Data *sd EIN
#define UNDERLINE_DASHED_GAP_FULL(part_typename, typename, CLASS, TYPENAME) \
ELM_PART_OVERRIDE_TEXT_UNDERLINE_DASHED_GAP_FULL(part_typename, typename, ELM_PART_OVERRIDE_INTERNALS_FETCH(CLASS, TYPENAME)) \
+static void
+_efl_ui_layout_text_underline_height_set(Eo *obj, Efl_Ui_Layout_Data *sd EINA_UNUSED,
+ const char *part, double height)
+{
+ ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
+ efl_text_underline_height_set(efl_part(wd->resize_obj, part), height);
+}
+
+#define UNDERLINE_HEIGHT_FULL(part_typename, typename, CLASS, TYPENAME) \
+ ELM_PART_OVERRIDE_TEXT_UNDERLINE_HEIGHT_FULL(part_typename, typename, ELM_PART_OVERRIDE_INTERNALS_FETCH(CLASS, TYPENAME)) \
+
TEXT_FULL(efl_ui_layout_part_text, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data)
MARKUP_FULL(efl_ui_layout_part_text, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data)
FONT_FULL(efl_ui_layout_part_text, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data)
@@ -2698,6 +2709,7 @@ STRIKETHROUGH_FULL(efl_ui_layout_part_text, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui
UNDERLINE_FULL(efl_ui_layout_part_text, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data)
UNDERLINE_DASHED_WIDTH_FULL(efl_ui_layout_part_text, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data)
UNDERLINE_DASHED_GAP_FULL(efl_ui_layout_part_text, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data)
+UNDERLINE_HEIGHT_FULL(efl_ui_layout_part_text, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data)
EOLIAN static const char *
_efl_ui_layout_part_text_efl_ui_translatable_translatable_text_get(const Eo *obj, void *_pd EINA_UNUSED, const char **domain)
diff --git a/src/lib/elementary/efl_ui_layout_part_text.eo b/src/lib/elementary/efl_ui_layout_part_text.eo
index fde5288bd3..8a5acfe2c6 100644
--- a/src/lib/elementary/efl_ui_layout_part_text.eo
+++ b/src/lib/elementary/efl_ui_layout_part_text.eo
@@ -25,5 +25,6 @@ class Efl.Ui.Layout_Part_Text (Efl.Ui.Layout_Part, Efl.Text, Efl.Text_Markup,
Efl.Text_Style.underline_type { set; }
Efl.Text_Style.underline_dashed_width { set; }
Efl.Text_Style.underline_dashed_gap { set; }
+ Efl.Text_Style.underline_height { set; }
}
}
diff --git a/src/lib/elementary/elm_part_helper.h b/src/lib/elementary/elm_part_helper.h
index 292ab9ccdf..efab9b8163 100644
--- a/src/lib/elementary/elm_part_helper.h
+++ b/src/lib/elementary/elm_part_helper.h
@@ -248,6 +248,14 @@ _ ## full ## _efl_text_style_underline_dashed_gap_set(Eo *obj, void *_pd EINA_UN
_ ## type ## _text_underline_dashed_gap_set(pd->obj, sd, pd->part, gap); \
}
+#define ELM_PART_OVERRIDE_TEXT_UNDERLINE_HEIGHT_FULL(full, type, internals) \
+EOLIAN static void \
+_ ## full ## _efl_text_style_underline_height_set(Eo *obj, void *_pd EINA_UNUSED, double height) \
+{ \
+ internals \
+ _ ## type ## _text_underline_height_set(pd->obj, sd, pd->part, height); \
+}
+
#define ELM_PART_OVERRIDE_CONTENT_SET(type, TYPE, typedata) \
ELM_PART_OVERRIDE_CONTENT_SET_FULL(type ## _part, type, ELM_PART_OVERRIDE_INTERNALS_FETCH(TYPE, typedata))