diff options
author | Daniel Hirt <hirt.danny@gmail.com> | 2018-11-06 16:53:03 +0200 |
---|---|---|
committer | Daniel Hirt <hirt.danny@gmail.com> | 2018-11-06 18:13:21 +0200 |
commit | 6285cfe366e7f60b862f19981062bdd2afe08c7c (patch) | |
tree | 7d0fbce24afd24e799ab4cdcc5dc46aec9fb1114 | |
parent | e1fc2ea48f14cb56548bfef9b972854ac5957110 (diff) |
Efl text style: remove 'underline2_type' property
This moves the logic to the 'underline_type' property, in which we
define the type.
Diffstat (limited to '')
-rw-r--r-- | src/lib/efl/interfaces/efl_text_style.eo | 9 | ||||
-rw-r--r-- | src/lib/evas/canvas/efl_canvas_text.eo | 1 | ||||
-rw-r--r-- | src/lib/evas/canvas/evas_object_textblock.c | 30 |
3 files changed, 16 insertions, 24 deletions
diff --git a/src/lib/efl/interfaces/efl_text_style.eo b/src/lib/efl/interfaces/efl_text_style.eo index 395609626c..99552ac036 100644 --- a/src/lib/efl/interfaces/efl_text_style.eo +++ b/src/lib/efl/interfaces/efl_text_style.eo | |||
@@ -153,15 +153,6 @@ interface Efl.Text_Style { | |||
153 | } | 153 | } |
154 | } | 154 | } |
155 | 155 | ||
156 | @property underline2_type | ||
157 | { | ||
158 | [[Type of underline2 style]] | ||
159 | values | ||
160 | { | ||
161 | type: Efl.Text_Style_Underline_Type; [[Underline type]] | ||
162 | } | ||
163 | } | ||
164 | |||
165 | @property underline2_color | 156 | @property underline2_color |
166 | { | 157 | { |
167 | [[Color of underline2 style]] | 158 | [[Color of underline2 style]] |
diff --git a/src/lib/evas/canvas/efl_canvas_text.eo b/src/lib/evas/canvas/efl_canvas_text.eo index 1f193443d0..3c18c32010 100644 --- a/src/lib/evas/canvas/efl_canvas_text.eo +++ b/src/lib/evas/canvas/efl_canvas_text.eo | |||
@@ -294,7 +294,6 @@ class Efl.Canvas.Text (Efl.Canvas.Object, Efl.Text, | |||
294 | Efl.Text_Style.underline_dashed_color { get; set; } | 294 | Efl.Text_Style.underline_dashed_color { get; set; } |
295 | Efl.Text_Style.underline_dashed_width { get; set; } | 295 | Efl.Text_Style.underline_dashed_width { get; set; } |
296 | Efl.Text_Style.underline_dashed_gap { get; set; } | 296 | Efl.Text_Style.underline_dashed_gap { get; set; } |
297 | Efl.Text_Style.underline2_type { get; set; } | ||
298 | Efl.Text_Style.underline2_color { get; set; } | 297 | Efl.Text_Style.underline2_color { get; set; } |
299 | Efl.Text_Style.strikethrough_type { get; set; } | 298 | Efl.Text_Style.strikethrough_type { get; set; } |
300 | Efl.Text_Style.strikethrough_color { get; set; } | 299 | Efl.Text_Style.strikethrough_color { get; set; } |
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c index e028f31c37..faca317aa5 100644 --- a/src/lib/evas/canvas/evas_object_textblock.c +++ b/src/lib/evas/canvas/evas_object_textblock.c | |||
@@ -15800,11 +15800,26 @@ _efl_canvas_text_efl_text_style_backing_color_get(const Eo *obj EINA_UNUSED, Efl | |||
15800 | _FMT_COLOR_RET(backing); | 15800 | _FMT_COLOR_RET(backing); |
15801 | } | 15801 | } |
15802 | 15802 | ||
15803 | static struct | ||
15804 | { | ||
15805 | Eina_Bool underline_single : 1; | ||
15806 | Eina_Bool underline_double : 1; | ||
15807 | Eina_Bool underline_dashed : 1; | ||
15808 | } _style_underline_map[] = { | ||
15809 | { 0, 0, 0 }, | ||
15810 | { 1, 0, 0 }, | ||
15811 | { 1, 1, 0 }, | ||
15812 | { 0, 0, 1 } | ||
15813 | }; | ||
15814 | |||
15803 | static void | 15815 | static void |
15804 | _efl_canvas_text_efl_text_style_underline_type_set(Eo *obj EINA_UNUSED, Efl_Canvas_Text_Data *o EINA_UNUSED, Efl_Text_Style_Underline_Type type EINA_UNUSED) | 15816 | _efl_canvas_text_efl_text_style_underline_type_set(Eo *obj EINA_UNUSED, Efl_Canvas_Text_Data *o EINA_UNUSED, Efl_Text_Style_Underline_Type type EINA_UNUSED) |
15805 | { | 15817 | { |
15806 | ASYNC_BLOCK; | 15818 | ASYNC_BLOCK; |
15807 | _FMT_SET(underline, type); | 15819 | _FMT_SET(underline, _style_underline_map[type].underline_single); |
15820 | _FMT_SET(underline2, _style_underline_map[type].underline_double); | ||
15821 | _FMT_SET(underline_dash, _style_underline_map[type].underline_dashed); | ||
15822 | |||
15808 | } | 15823 | } |
15809 | 15824 | ||
15810 | static Efl_Text_Style_Underline_Type | 15825 | static Efl_Text_Style_Underline_Type |
@@ -15879,19 +15894,6 @@ _efl_canvas_text_efl_text_style_underline_dashed_gap_get(const Eo *obj EINA_UNUS | |||
15879 | } | 15894 | } |
15880 | 15895 | ||
15881 | static void | 15896 | static void |
15882 | _efl_canvas_text_efl_text_style_underline2_type_set(Eo *obj EINA_UNUSED, Efl_Canvas_Text_Data *o EINA_UNUSED, Efl_Text_Style_Underline_Type type EINA_UNUSED) | ||
15883 | { | ||
15884 | ASYNC_BLOCK; | ||
15885 | _FMT_SET(underline2, type); | ||
15886 | } | ||
15887 | |||
15888 | static Efl_Text_Style_Underline_Type | ||
15889 | _efl_canvas_text_efl_text_style_underline2_type_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Text_Data *o EINA_UNUSED) | ||
15890 | { | ||
15891 | return _FMT(underline2); | ||
15892 | } | ||
15893 | |||
15894 | static void | ||
15895 | _efl_canvas_text_efl_text_style_underline2_color_set(Eo *obj EINA_UNUSED, Efl_Canvas_Text_Data *o EINA_UNUSED, unsigned char r EINA_UNUSED, unsigned char g EINA_UNUSED, unsigned char b EINA_UNUSED, unsigned char a EINA_UNUSED) | 15897 | _efl_canvas_text_efl_text_style_underline2_color_set(Eo *obj EINA_UNUSED, Efl_Canvas_Text_Data *o EINA_UNUSED, unsigned char r EINA_UNUSED, unsigned char g EINA_UNUSED, unsigned char b EINA_UNUSED, unsigned char a EINA_UNUSED) |
15896 | { | 15898 | { |
15897 | ASYNC_BLOCK; | 15899 | ASYNC_BLOCK; |