diff options
| author | Daniel J. Ramirez | 2017-01-22 22:40:43 -0600 |
|---|---|---|
| committer | Rémi Verschelde | 2017-04-27 08:04:57 +0200 |
| commit | f045efe007cffb87238ee519b7f33d710814ded7 (patch) | |
| tree | 9cb7b21ee73cd6a184ef2b18daff6867b98062d8 /scene/gui/line_edit.cpp | |
| parent | 5993a5fac9a108297fc7909d1a38abac471d037d (diff) | |
| download | godot-f045efe007cffb87238ee519b7f33d710814ded7.tar.gz godot-f045efe007cffb87238ee519b7f33d710814ded7.tar.zst godot-f045efe007cffb87238ee519b7f33d710814ded7.zip | |
Diffstat (limited to 'scene/gui/line_edit.cpp')
| -rw-r--r-- | scene/gui/line_edit.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 9abf9649c..0acb7265e 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -576,7 +576,7 @@ void LineEdit::_notification(int p_what) { RID ci = get_canvas_item(); - Ref<StyleBox> style = get_stylebox("normal"); + Ref<StyleBox> style = has_focus() ? get_stylebox("active") : get_stylebox("normal"); if (!is_editable()) style = get_stylebox("read_only"); @@ -617,7 +617,7 @@ void LineEdit::_notification(int p_what) { int font_ascent = font->get_ascent(); Color selection_color = get_color("selection_color"); - Color font_color = get_color("font_color"); + Color font_color = is_editable() ? has_focus() ? get_color("font_color_active") : get_color("font_color") : get_color("font_color_read_only"); Color font_color_selected = get_color("font_color_selected"); Color cursor_color = get_color("cursor_color"); |
