efl.text_style: remame underline2 and glow2

Summary: rename underline2 into secondary_underline and glow2 into secondary_glow

Reviewers: woohyun, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7857

Differential Revision: https://phab.enlightenment.org/D11024
This commit is contained in:
Ali Alzyod 2020-01-07 09:20:29 +01:00 committed by Xavi Artigas
parent 5196484832
commit 36a50f4d82
6 changed files with 33 additions and 27 deletions

View File

@ -98,13 +98,13 @@ _efl_canvas_layout_part_text_efl_text_style_ ##x ##_color_get(const Eo *obj, \
TEXT_COLOR_IMPL(text_background, BACKING)
TEXT_COLOR_IMPL(text_glow, GLOW)
TEXT_COLOR_IMPL(text_glow2, GLOW2)
TEXT_COLOR_IMPL(text_secondary_glow, GLOW2)
TEXT_COLOR_IMPL(text, NORMAL)
TEXT_COLOR_IMPL(text_outline, OUTLINE)
TEXT_COLOR_IMPL(text_shadow, SHADOW)
TEXT_COLOR_IMPL(text_strikethrough, STRIKETHROUGH)
TEXT_COLOR_IMPL(text_underline, UNDERLINE)
TEXT_COLOR_IMPL(text_underline2, UNDERLINE2)
TEXT_COLOR_IMPL(text_secondary_underline, UNDERLINE2)
TEXT_COLOR_IMPL(text_underline_dashed, UNDERLINE_DASHED)
EOLIAN static void
@ -367,13 +367,13 @@ _canvas_layout_user_text_collect(Edje *ed, Edje_User_Defined *eud)
STYLE_COLOR_COLLECT(text_background, BACKING)
STYLE_COLOR_COLLECT(text_glow, GLOW)
STYLE_COLOR_COLLECT(text_glow2, GLOW2)
STYLE_COLOR_COLLECT(text_secondary_glow, GLOW2)
STYLE_COLOR_COLLECT(text, NORMAL)
STYLE_COLOR_COLLECT(text_outline, OUTLINE)
STYLE_COLOR_COLLECT(text_shadow, SHADOW)
STYLE_COLOR_COLLECT(text_strikethrough, STRIKETHROUGH)
STYLE_COLOR_COLLECT(text_underline, UNDERLINE)
STYLE_COLOR_COLLECT(text_underline2, UNDERLINE2)
STYLE_COLOR_COLLECT(text_secondary_underline, UNDERLINE2)
STYLE_COLOR_COLLECT(text_underline_dashed, UNDERLINE_DASHED)
#undef STYLE_COLOR_COLLECT
@ -486,13 +486,13 @@ _canvas_layout_user_text_apply(Edje_User_Defined *eud, Eo *obj,
STYLE_COLOR_CASE(text_background, BACKING)
STYLE_COLOR_CASE(text_glow, GLOW)
STYLE_COLOR_CASE(text_glow2, GLOW2)
STYLE_COLOR_CASE(text_secondary_glow, GLOW2)
STYLE_COLOR_CASE(text, NORMAL)
STYLE_COLOR_CASE(text_outline, OUTLINE)
STYLE_COLOR_CASE(text_shadow, SHADOW)
STYLE_COLOR_CASE(text_strikethrough, STRIKETHROUGH)
STYLE_COLOR_CASE(text_underline, UNDERLINE)
STYLE_COLOR_CASE(text_underline2, UNDERLINE2)
STYLE_COLOR_CASE(text_secondary_underline, UNDERLINE2)
STYLE_COLOR_CASE(text_underline_dashed, UNDERLINE_DASHED)
#undef STYLE_COLOR_CASE

View File

@ -45,7 +45,7 @@ Efl.Text_Markup, Efl.Text_Format, Efl.Text_Font_Properties, Efl.Text_Style
Efl.Text_Style.text_background_color { set; get;}
Efl.Text_Style.text_underline_type { set; }
Efl.Text_Style.text_underline_color { set; get; }
Efl.Text_Style.text_underline2_color { set; get; }
Efl.Text_Style.text_secondary_underline_color { set; get; }
Efl.Text_Style.text_underline_dashed_color { set; get; }
Efl.Text_Style.text_underline_height { set; }
Efl.Text_Style.text_underline_dashed_width { set; }
@ -57,6 +57,6 @@ Efl.Text_Markup, Efl.Text_Format, Efl.Text_Font_Properties, Efl.Text_Style
Efl.Text_Style.text_outline_color { set; get; }
Efl.Text_Style.text_shadow_color { set; get; }
Efl.Text_Style.text_glow_color { set; get; }
Efl.Text_Style.text_glow2_color { set; get; }
Efl.Text_Style.text_secondary_glow_color { set; get; }
}
}

View File

@ -156,7 +156,7 @@ interface @beta Efl.Text_Style {
}
}
@property text_underline2_color
@property text_secondary_underline_color
{
[[Color of the secondary underline. Only valid when @.text_underline_type is
@Efl.Text_Style_Underline_Type.double.]]
@ -241,7 +241,7 @@ interface @beta Efl.Text_Style {
}
}
@property text_glow2_color
@property text_secondary_glow_color
{
[[Color of the secondary glow decoration.
This is the color of the inner glow (where it touches the text) which

View File

@ -149,10 +149,10 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text,
Requires $underline.
See @Efl.Text_Style.text_underline_color.
- $underline2_color: Color code for the secondary text underline (See bottom for the complete list of
- $secondary_underline_color: Color code for the secondary text underline (See bottom for the complete list of
supported codes). Only valid when $[underline=double].
Default value is $[rgba(0,0,0,0)] meaning that secondary underline will not be rendered.
See @Efl.Text_Style.text_underline2_color.
See @Efl.Text_Style.text_secondary_underline_color.
- $underline_dash_color: Color code for the dashed underline (See bottom for the complete list of supported
codes). Only valid when $[underline=dashed].
@ -174,10 +174,10 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text,
Default value is $[rgba(0,0,0,0)] meaning that no glow will be rendered.
See @Efl.Text_Style.text_glow_color.
- $glow2_color: Color code for the secondary (inner) glow component of the text (See bottom for the complete
- $secondary_glow_color: Color code for the secondary (inner) glow component of the text (See bottom for the complete
list of supported codes). Only valid when the $style attribute includes a glow.
Default value is $[rgba(0,0,0,0)] meaning that only the primary $glow_color will be used.
See @Efl.Text_Style.text_glow2_color.
See @Efl.Text_Style.text_secondary_glow_color.
- $backing_color: Color code for the background of the text (See bottom for the complete list of supported
codes). Use a fully transparent color to disable the background.
@ -232,7 +232,7 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text,
$single (A single line under the text), $on (Alias for $single), $double (Two lines under the text),
$dashed (A dashed line under the text).
Default value is $off.
Requires either $underline_color, $underline2_color or $underline_dash_color.
Requires either $underline_color, $secondary_underline_color or $underline_dash_color.
See @Efl.Text_Style.text_underline_type.
- $strikethrough: Enables crossed-out text. Possible values are $on and $off.
@ -473,7 +473,7 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text,
Efl.Text_Style.text_underline_dashed_color { get; set; }
Efl.Text_Style.text_underline_dashed_width { get; set; }
Efl.Text_Style.text_underline_dashed_gap { get; set; }
Efl.Text_Style.text_underline2_color { get; set; }
Efl.Text_Style.text_secondary_underline_color { get; set; }
Efl.Text_Style.text_strikethrough_type { get; set; }
Efl.Text_Style.text_strikethrough_color { get; set; }
Efl.Text_Style.text_effect_type { get; set; }
@ -481,7 +481,7 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text,
Efl.Text_Style.text_shadow_direction { get; set; }
Efl.Text_Style.text_shadow_color { get; set; }
Efl.Text_Style.text_glow_color { get; set; }
Efl.Text_Style.text_glow2_color { get; set; }
Efl.Text_Style.text_secondary_glow_color { get; set; }
Efl.Text_Style.text_gfx_filter { get; set; }
Efl.Text_Format.ellipsis { get; set; }
Efl.Text_Format.wrap { get; set; }

View File

@ -1398,11 +1398,13 @@ static const char *langstr = NULL;
static const char *colorstr = NULL;
static const char *underline_colorstr = NULL;
static const char *underline2_colorstr = NULL;
static const char *secondary_underline_colorstr = NULL;
static const char *underline_dash_colorstr = NULL;
static const char *outline_colorstr = NULL;
static const char *shadow_colorstr = NULL;
static const char *glow_colorstr = NULL;
static const char *glow2_colorstr = NULL;
static const char *secondary_glow_colorstr = NULL;
static const char *backing_colorstr = NULL;
static const char *strikethrough_colorstr = NULL;
static const char *alignstr = NULL;
@ -1585,11 +1587,13 @@ _format_command_init(void)
colorstr = eina_stringshare_add("color");
underline_colorstr = eina_stringshare_add("underline_color");
underline2_colorstr = eina_stringshare_add("underline2_color");
secondary_underline_colorstr = eina_stringshare_add("secondary_underline_color");
underline_dash_colorstr = eina_stringshare_add("underline_dash_color");
outline_colorstr = eina_stringshare_add("outline_color");
shadow_colorstr = eina_stringshare_add("shadow_color");
glow_colorstr = eina_stringshare_add("glow_color");
glow2_colorstr = eina_stringshare_add("glow2_color");
secondary_glow_colorstr = eina_stringshare_add("secondary_glow_color");
backing_colorstr = eina_stringshare_add("backing_color");
strikethrough_colorstr = eina_stringshare_add("strikethrough_color");
alignstr = eina_stringshare_add("align");
@ -1640,11 +1644,13 @@ _format_command_shutdown(void)
eina_stringshare_del(colorstr);
eina_stringshare_del(underline_colorstr);
eina_stringshare_del(underline2_colorstr);
eina_stringshare_del(secondary_underline_colorstr);
eina_stringshare_del(underline_dash_colorstr);
eina_stringshare_del(outline_colorstr);
eina_stringshare_del(shadow_colorstr);
eina_stringshare_del(glow_colorstr);
eina_stringshare_del(glow2_colorstr);
eina_stringshare_del(secondary_glow_colorstr);
eina_stringshare_del(backing_colorstr);
eina_stringshare_del(strikethrough_colorstr);
eina_stringshare_del(alignstr);
@ -1936,7 +1942,7 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch
evas_common_format_color_parse(param, len,
&(fmt->color.underline.r), &(fmt->color.underline.g),
&(fmt->color.underline.b), &(fmt->color.underline.a));
else if (cmd == underline2_colorstr)
else if (cmd == underline2_colorstr || cmd == secondary_underline_colorstr)
/**
* @page evas_textblock_style_page Evas Textblock Style Options
*
@ -2045,7 +2051,7 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch
evas_common_format_color_parse(param, len,
&(fmt->color.glow.r), &(fmt->color.glow.g),
&(fmt->color.glow.b), &(fmt->color.glow.a));
else if (cmd == glow2_colorstr)
else if (cmd == glow2_colorstr || cmd == secondary_glow_colorstr)
/**
* @page evas_textblock_style_page Evas Textblock Style Options
*
@ -16497,14 +16503,14 @@ _efl_canvas_textblock_efl_text_style_text_underline_dashed_gap_get(const Eo *obj
}
static void
_efl_canvas_textblock_efl_text_style_text_underline2_color_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char r EINA_UNUSED, unsigned char g EINA_UNUSED, unsigned char b EINA_UNUSED, unsigned char a EINA_UNUSED)
_efl_canvas_textblock_efl_text_style_text_secondary_underline_color_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char r EINA_UNUSED, unsigned char g EINA_UNUSED, unsigned char b EINA_UNUSED, unsigned char a EINA_UNUSED)
{
ASYNC_BLOCK;
_FMT_COLOR_SET(underline2);
}
static void
_efl_canvas_textblock_efl_text_style_text_underline2_color_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char *r EINA_UNUSED, unsigned char *g EINA_UNUSED, unsigned char *b EINA_UNUSED, unsigned char *a EINA_UNUSED)
_efl_canvas_textblock_efl_text_style_text_secondary_underline_color_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char *r EINA_UNUSED, unsigned char *g EINA_UNUSED, unsigned char *b EINA_UNUSED, unsigned char *a EINA_UNUSED)
{
_FMT_COLOR_RET(underline2);
}
@ -16671,14 +16677,14 @@ _efl_canvas_textblock_efl_text_style_text_glow_color_get(const Eo *obj EINA_UNUS
}
static void
_efl_canvas_textblock_efl_text_style_text_glow2_color_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char r EINA_UNUSED, unsigned char g EINA_UNUSED, unsigned char b EINA_UNUSED, unsigned char a EINA_UNUSED)
_efl_canvas_textblock_efl_text_style_text_secondary_glow_color_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char r EINA_UNUSED, unsigned char g EINA_UNUSED, unsigned char b EINA_UNUSED, unsigned char a EINA_UNUSED)
{
ASYNC_BLOCK;
_FMT_COLOR_SET(glow2);
}
static void
_efl_canvas_textblock_efl_text_style_text_glow2_color_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char *r EINA_UNUSED, unsigned char *g EINA_UNUSED, unsigned char *b EINA_UNUSED, unsigned char *a EINA_UNUSED)
_efl_canvas_textblock_efl_text_style_text_secondary_glow_color_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, unsigned char *r EINA_UNUSED, unsigned char *g EINA_UNUSED, unsigned char *b EINA_UNUSED, unsigned char *a EINA_UNUSED)
{
_FMT_COLOR_RET(glow2);
}

View File

@ -240,7 +240,7 @@ _basic_check(Eo *layout, Eina_Bool set)
255, 255, 255, 255);
efl_text_glow_color_set(efl_part(layout, "text"),
255, 255, 255, 255);
efl_text_glow2_color_set(efl_part(layout, "text"),
efl_text_secondary_glow_color_set(efl_part(layout, "text"),
255, 255, 255, 255);
efl_text_outline_color_set(efl_part(layout, "text"),
255, 255, 255, 255);
@ -250,7 +250,7 @@ _basic_check(Eo *layout, Eina_Bool set)
255, 255, 255, 255);
efl_text_underline_color_set(efl_part(layout, "text"),
255, 255, 255, 255);
efl_text_underline2_color_set(efl_part(layout, "text"),
efl_text_secondary_underline_color_set(efl_part(layout, "text"),
255, 255, 255, 255);
efl_text_underline_dashed_color_set(efl_part(layout, "text"),
255, 255, 255, 255);
@ -274,7 +274,7 @@ _basic_check(Eo *layout, Eina_Bool set)
ck_assert_int_eq(b, 255);
ck_assert_int_eq(a, 255);
efl_text_glow2_color_get(efl_part(layout, "text"), &r, &g, &b, &a);
efl_text_secondary_glow_color_get(efl_part(layout, "text"), &r, &g, &b, &a);
ck_assert_int_eq(r, 255);
ck_assert_int_eq(g, 255);
ck_assert_int_eq(b, 255);
@ -304,7 +304,7 @@ _basic_check(Eo *layout, Eina_Bool set)
ck_assert_int_eq(b, 255);
ck_assert_int_eq(a, 255);
efl_text_underline2_color_get(efl_part(layout, "text"), &r, &g, &b, &a);
efl_text_secondary_underline_color_get(efl_part(layout, "text"), &r, &g, &b, &a);
ck_assert_int_eq(r, 255);
ck_assert_int_eq(g, 255);
ck_assert_int_eq(b, 255);