forked from enlightenment/efl
Efl text style: remove 'underline2_type' property
This moves the logic to the 'underline_type' property, in which we define the type.
This commit is contained in:
parent
e1fc2ea48f
commit
6285cfe366
|
@ -153,15 +153,6 @@ interface Efl.Text_Style {
|
|||
}
|
||||
}
|
||||
|
||||
@property underline2_type
|
||||
{
|
||||
[[Type of underline2 style]]
|
||||
values
|
||||
{
|
||||
type: Efl.Text_Style_Underline_Type; [[Underline type]]
|
||||
}
|
||||
}
|
||||
|
||||
@property underline2_color
|
||||
{
|
||||
[[Color of underline2 style]]
|
||||
|
|
|
@ -294,7 +294,6 @@ class Efl.Canvas.Text (Efl.Canvas.Object, Efl.Text,
|
|||
Efl.Text_Style.underline_dashed_color { get; set; }
|
||||
Efl.Text_Style.underline_dashed_width { get; set; }
|
||||
Efl.Text_Style.underline_dashed_gap { get; set; }
|
||||
Efl.Text_Style.underline2_type { get; set; }
|
||||
Efl.Text_Style.underline2_color { get; set; }
|
||||
Efl.Text_Style.strikethrough_type { get; set; }
|
||||
Efl.Text_Style.strikethrough_color { get; set; }
|
||||
|
|
|
@ -15800,11 +15800,26 @@ _efl_canvas_text_efl_text_style_backing_color_get(const Eo *obj EINA_UNUSED, Efl
|
|||
_FMT_COLOR_RET(backing);
|
||||
}
|
||||
|
||||
static struct
|
||||
{
|
||||
Eina_Bool underline_single : 1;
|
||||
Eina_Bool underline_double : 1;
|
||||
Eina_Bool underline_dashed : 1;
|
||||
} _style_underline_map[] = {
|
||||
{ 0, 0, 0 },
|
||||
{ 1, 0, 0 },
|
||||
{ 1, 1, 0 },
|
||||
{ 0, 0, 1 }
|
||||
};
|
||||
|
||||
static void
|
||||
_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)
|
||||
{
|
||||
ASYNC_BLOCK;
|
||||
_FMT_SET(underline, type);
|
||||
_FMT_SET(underline, _style_underline_map[type].underline_single);
|
||||
_FMT_SET(underline2, _style_underline_map[type].underline_double);
|
||||
_FMT_SET(underline_dash, _style_underline_map[type].underline_dashed);
|
||||
|
||||
}
|
||||
|
||||
static Efl_Text_Style_Underline_Type
|
||||
|
@ -15878,19 +15893,6 @@ _efl_canvas_text_efl_text_style_underline_dashed_gap_get(const Eo *obj EINA_UNUS
|
|||
return _FMT(underline_dash_width);
|
||||
}
|
||||
|
||||
static void
|
||||
_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)
|
||||
{
|
||||
ASYNC_BLOCK;
|
||||
_FMT_SET(underline2, type);
|
||||
}
|
||||
|
||||
static Efl_Text_Style_Underline_Type
|
||||
_efl_canvas_text_efl_text_style_underline2_type_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Text_Data *o EINA_UNUSED)
|
||||
{
|
||||
return _FMT(underline2);
|
||||
}
|
||||
|
||||
static void
|
||||
_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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue