summaryrefslogtreecommitdiff
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
parent263a5d4d158a165f19f2391407571c503a6193a8 (diff)
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)
60 efl_text_underline_color_set(efl_part(custom_bt, "efl.text"), 0, 0, 0, 255); 60 efl_text_underline_color_set(efl_part(custom_bt, "efl.text"), 0, 0, 0, 255);
61 efl_text_underline2_color_set(efl_part(custom_bt, "efl.text"), 0, 0, 0, 255); 61 efl_text_underline2_color_set(efl_part(custom_bt, "efl.text"), 0, 0, 0, 255);
62 efl_text_underline_dashed_color_set(efl_part(custom_bt, "efl.text"), 0, 0, 0, 255); 62 efl_text_underline_dashed_color_set(efl_part(custom_bt, "efl.text"), 0, 0, 0, 255);
63 efl_text_underline_type_set(efl_part(custom_bt, "efl.text"), EFL_TEXT_STYLE_UNDERLINE_TYPE_DASHED);
64 efl_text_underline_dashed_width_set(efl_part(custom_bt, "efl.text"), 10); 63 efl_text_underline_dashed_width_set(efl_part(custom_bt, "efl.text"), 10);
65 efl_text_underline_dashed_gap_set(efl_part(custom_bt, "efl.text"), 15); 64 efl_text_underline_dashed_gap_set(efl_part(custom_bt, "efl.text"), 15);
65 efl_text_underline_height_set(efl_part(custom_bt, "efl.text"), 4.5);
66 66
67 efl_gfx_entity_size_set(win, EINA_SIZE2D(300, 320)); 67 efl_gfx_entity_size_set(win, EINA_SIZE2D(300, 320));
68} 68}
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
2679#define UNDERLINE_DASHED_GAP_FULL(part_typename, typename, CLASS, TYPENAME) \ 2679#define UNDERLINE_DASHED_GAP_FULL(part_typename, typename, CLASS, TYPENAME) \
2680 ELM_PART_OVERRIDE_TEXT_UNDERLINE_DASHED_GAP_FULL(part_typename, typename, ELM_PART_OVERRIDE_INTERNALS_FETCH(CLASS, TYPENAME)) \ 2680 ELM_PART_OVERRIDE_TEXT_UNDERLINE_DASHED_GAP_FULL(part_typename, typename, ELM_PART_OVERRIDE_INTERNALS_FETCH(CLASS, TYPENAME)) \
2681 2681
2682static void
2683_efl_ui_layout_text_underline_height_set(Eo *obj, Efl_Ui_Layout_Data *sd EINA_UNUSED,
2684 const char *part, double height)
2685{
2686 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
2687 efl_text_underline_height_set(efl_part(wd->resize_obj, part), height);
2688}
2689
2690#define UNDERLINE_HEIGHT_FULL(part_typename, typename, CLASS, TYPENAME) \
2691 ELM_PART_OVERRIDE_TEXT_UNDERLINE_HEIGHT_FULL(part_typename, typename, ELM_PART_OVERRIDE_INTERNALS_FETCH(CLASS, TYPENAME)) \
2692
2682TEXT_FULL(efl_ui_layout_part_text, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data) 2693TEXT_FULL(efl_ui_layout_part_text, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data)
2683MARKUP_FULL(efl_ui_layout_part_text, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data) 2694MARKUP_FULL(efl_ui_layout_part_text, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data)
2684FONT_FULL(efl_ui_layout_part_text, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data) 2695FONT_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
2698UNDERLINE_FULL(efl_ui_layout_part_text, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data) 2709UNDERLINE_FULL(efl_ui_layout_part_text, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data)
2699UNDERLINE_DASHED_WIDTH_FULL(efl_ui_layout_part_text, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data) 2710UNDERLINE_DASHED_WIDTH_FULL(efl_ui_layout_part_text, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data)
2700UNDERLINE_DASHED_GAP_FULL(efl_ui_layout_part_text, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data) 2711UNDERLINE_DASHED_GAP_FULL(efl_ui_layout_part_text, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data)
2712UNDERLINE_HEIGHT_FULL(efl_ui_layout_part_text, efl_ui_layout, EFL_UI_LAYOUT, Efl_Ui_Layout_Data)
2701 2713
2702EOLIAN static const char * 2714EOLIAN static const char *
2703_efl_ui_layout_part_text_efl_ui_translatable_translatable_text_get(const Eo *obj, void *_pd EINA_UNUSED, const char **domain) 2715_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,
25 Efl.Text_Style.underline_type { set; } 25 Efl.Text_Style.underline_type { set; }
26 Efl.Text_Style.underline_dashed_width { set; } 26 Efl.Text_Style.underline_dashed_width { set; }
27 Efl.Text_Style.underline_dashed_gap { set; } 27 Efl.Text_Style.underline_dashed_gap { set; }
28 Efl.Text_Style.underline_height { set; }
28 } 29 }
29} 30}
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
248 _ ## type ## _text_underline_dashed_gap_set(pd->obj, sd, pd->part, gap); \ 248 _ ## type ## _text_underline_dashed_gap_set(pd->obj, sd, pd->part, gap); \
249} 249}
250 250
251#define ELM_PART_OVERRIDE_TEXT_UNDERLINE_HEIGHT_FULL(full, type, internals) \
252EOLIAN static void \
253_ ## full ## _efl_text_style_underline_height_set(Eo *obj, void *_pd EINA_UNUSED, double height) \
254{ \
255 internals \
256 _ ## type ## _text_underline_height_set(pd->obj, sd, pd->part, height); \
257}
258
251#define ELM_PART_OVERRIDE_CONTENT_SET(type, TYPE, typedata) \ 259#define ELM_PART_OVERRIDE_CONTENT_SET(type, TYPE, typedata) \
252 ELM_PART_OVERRIDE_CONTENT_SET_FULL(type ## _part, type, ELM_PART_OVERRIDE_INTERNALS_FETCH(TYPE, typedata)) 260 ELM_PART_OVERRIDE_CONTENT_SET_FULL(type ## _part, type, ELM_PART_OVERRIDE_INTERNALS_FETCH(TYPE, typedata))
253 261