Merge pull request #62829 from bruvzg/font_fix_2

Fix regressions from Font refactor (2)
This commit is contained in:
Rémi Verschelde 2022-07-08 08:02:09 +02:00 committed by GitHub
commit 2b6dadd46b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -1895,7 +1895,6 @@ CodeTextEditor::CodeTextEditor() {
} break;
}
}
text_editor->add_theme_font_override("font", fc);
text_editor->set_draw_line_numbers(true);
text_editor->set_highlight_matching_braces_enabled(true);

View file

@ -342,7 +342,11 @@ void Button::_notification(int p_what) {
} break;
}
text_buf->draw_outline(ci, text_ofs, get_theme_constant(SNAME("outline_size")), get_theme_color(SNAME("font_outline_color")));
Color font_outline_color = get_theme_color(SNAME("font_outline_color"));
int outline_size = get_theme_constant(SNAME("outline_size"));
if (outline_size > 0 && font_outline_color.a > 0) {
text_buf->draw_outline(ci, text_ofs, outline_size, font_outline_color);
}
text_buf->draw(ci, text_ofs, color);
} break;
}