Skip to content

Commit

Permalink
feat(textview): add TextView_SetColor()
Browse files Browse the repository at this point in the history
  • Loading branch information
lc-soft committed Dec 16, 2018
1 parent 19992d1 commit 3a7b53f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/LCUI/gui/widget/textview.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ LCUI_API void TextView_SetLineHeight(LCUI_Widget w, int height);

LCUI_API void TextView_SetTextAlign(LCUI_Widget w, int align);

LCUI_API void TextView_SetColor(LCUI_Widget w, LCUI_Color color);

LCUI_API void TextView_SetAutoWrap(LCUI_Widget w, LCUI_BOOL enable);

LCUI_API void TextView_SetMulitiline(LCUI_Widget w, LCUI_BOOL enable);
Expand Down
5 changes: 5 additions & 0 deletions src/gui/widget/textview.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,11 @@ void TextView_SetTextAlign(LCUI_Widget w, int align)
Widget_SetFontStyle(w, key_text_align, align, style);
}

void TextView_SetColor(LCUI_Widget w, LCUI_Color color)
{
Widget_SetFontStyle(w, key_color, color, color);
}

void TextView_SetAutoWrap(LCUI_Widget w, LCUI_BOOL enable)
{
if (enable) {
Expand Down

0 comments on commit 3a7b53f

Please sign in to comment.