draw: remove useless AlignAuto
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
75e6f4cb9e
commit
93be5b3cae
8
draw.c
8
draw.c
|
@ -864,8 +864,8 @@ draw_text_extents(int phys_screen, font_t *font,
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Transform a string to a alignment_t type.
|
/** Transform a string to a alignment_t type.
|
||||||
* Recognized string are left, center or right. Everything else will be
|
* Recognized string are flex, left, center or right. Everything else will be
|
||||||
* recognized as AlignAuto.
|
* recognized as AlignLeft.
|
||||||
* \param align Atring with align text.
|
* \param align Atring with align text.
|
||||||
* \param len The string length.
|
* \param len The string length.
|
||||||
* \return An alignment_t type.
|
* \return An alignment_t type.
|
||||||
|
@ -875,11 +875,10 @@ draw_align_fromstr(const char *align, ssize_t len)
|
||||||
{
|
{
|
||||||
switch (a_tokenize(align, len))
|
switch (a_tokenize(align, len))
|
||||||
{
|
{
|
||||||
case A_TK_LEFT: return AlignLeft;
|
|
||||||
case A_TK_CENTER: return AlignCenter;
|
case A_TK_CENTER: return AlignCenter;
|
||||||
case A_TK_RIGHT: return AlignRight;
|
case A_TK_RIGHT: return AlignRight;
|
||||||
case A_TK_FLEX: return AlignFlex;
|
case A_TK_FLEX: return AlignFlex;
|
||||||
default: return AlignAuto;
|
default: return AlignLeft;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -896,7 +895,6 @@ draw_align_tostr(alignment_t a)
|
||||||
case AlignCenter: return "center";
|
case AlignCenter: return "center";
|
||||||
case AlignRight: return "right";
|
case AlignRight: return "right";
|
||||||
case AlignFlex: return "flex";
|
case AlignFlex: return "flex";
|
||||||
case AlignAuto: return "auto";
|
|
||||||
default: return NULL;
|
default: return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue