1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Merge pull request #62108 from bruvzg/font_config_v3

This commit is contained in:
Rémi Verschelde
2022-07-07 12:22:49 +02:00
committed by GitHub
113 changed files with 5041 additions and 6485 deletions

View File

@@ -186,7 +186,7 @@ void EditorHelp::_class_desc_resized(bool p_force_update_theme) {
// The margins increase as the width of the editor help container increases.
Ref<Font> doc_code_font = get_theme_font(SNAME("doc_source"), SNAME("EditorFonts"));
int font_size = get_theme_font_size(SNAME("doc_source_size"), SNAME("EditorFonts"));
real_t char_width = doc_code_font->get_char_size('x', 0, font_size).width;
real_t char_width = doc_code_font->get_char_size('x', font_size).width;
const int new_display_margin = MAX(30 * EDSCALE, get_parent_anchorable_rect().size.width - char_width * 120 * EDSCALE) * 0.5;
if (display_margin != new_display_margin || p_force_update_theme) {
display_margin = new_display_margin;