Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions scene/gui/text_edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6018,6 +6018,10 @@ bool TextEdit::is_drawing_spaces() const {
return draw_spaces;
}

Color TextEdit::get_font_color() const {
return theme_cache.font_color;
}

void TextEdit::_bind_methods() {
/* Internal. */

Expand Down
4 changes: 2 additions & 2 deletions scene/gui/text_edit.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@
class TextEdit : public Control {
GDCLASS(TextEdit, Control);

friend class CodeHighlighter;

public:
/* Edit Actions. */
enum EditAction {
Expand Down Expand Up @@ -1029,6 +1027,8 @@ class TextEdit : public Control {
void set_draw_spaces(bool p_enabled);
bool is_drawing_spaces() const;

Color get_font_color() const;

TextEdit(const String &p_placeholder = String());
};

Expand Down
2 changes: 1 addition & 1 deletion scene/resources/syntax_highlighter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ void CodeHighlighter::_clear_highlighting_cache() {
}

void CodeHighlighter::_update_cache() {
font_color = text_edit->theme_cache.font_color;
font_color = text_edit->get_font_color();
}

void CodeHighlighter::add_keyword_color(const String &p_keyword, const Color &p_color) {
Expand Down