diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_fonts.cpp | 15 | ||||
-rw-r--r-- | editor/editor_themes.cpp | 3 | ||||
-rw-r--r-- | editor/project_manager.cpp | 3 | ||||
-rw-r--r-- | editor/property_editor.cpp | 2 |
4 files changed, 11 insertions, 12 deletions
diff --git a/editor/editor_fonts.cpp b/editor/editor_fonts.cpp index 05f9da03e1..7e20077fd6 100644 --- a/editor/editor_fonts.cpp +++ b/editor/editor_fonts.cpp @@ -122,20 +122,24 @@ void editor_register_fonts(Ref<Theme> p_theme) { dfmono->set_font_ptr(_font_Hack_Regular, _font_Hack_Regular_size); //dfd->set_force_autohinter(true); //just looks better..i think? - MAKE_DEFAULT_FONT(df, int(EditorSettings::get_singleton()->get("interface/editor/font_size")) * EDSCALE); + int default_font_size = int(EditorSettings::get_singleton()->get("interface/editor/font_size")) * EDSCALE; + MAKE_DEFAULT_FONT(df, default_font_size); p_theme->set_default_theme_font(df); + MAKE_DEFAULT_FONT(df_title, default_font_size + 2 * EDSCALE); + p_theme->set_font("title", "EditorFonts", df_title); + //Ref<BitmapFont> doc_font = make_font(_bi_font_doc_font_height,_bi_font_doc_font_ascent,0,_bi_font_doc_font_charcount,_bi_font_doc_font_characters,p_theme->get_icon("DocFont","EditorIcons")); //Ref<BitmapFont> doc_title_font = make_font(_bi_font_doc_title_font_height,_bi_font_doc_title_font_ascent,0,_bi_font_doc_title_font_charcount,_bi_font_doc_title_font_characters,p_theme->get_icon("DocTitleFont","EditorIcons")); //Ref<BitmapFont> doc_code_font = make_font(_bi_font_doc_code_font_height,_bi_font_doc_code_font_ascent,0,_bi_font_doc_code_font_charcount,_bi_font_doc_code_font_characters,p_theme->get_icon("DocCodeFont","EditorIcons")); - MAKE_DEFAULT_FONT(df_title, int(EDITOR_DEF("text_editor/help/help_title_font_size", 16)) * EDSCALE); + MAKE_DEFAULT_FONT(df_doc_title, int(EDITOR_DEF("text_editor/help/help_title_font_size", 16)) * EDSCALE); MAKE_DEFAULT_FONT(df_doc, int(EDITOR_DEF("text_editor/help/help_font_size", 14)) * EDSCALE); p_theme->set_font("doc", "EditorFonts", df_doc); - p_theme->set_font("doc_title", "EditorFonts", df_title); + p_theme->set_font("doc_title", "EditorFonts", df_doc_title); MAKE_DEFAULT_FONT(df_rulers, int(EDITOR_DEF("canvas_item_editor/rulers", 8)) * EDSCALE); p_theme->set_font("rulers", "EditorFonts", df_rulers); @@ -176,9 +180,4 @@ void editor_register_fonts(Ref<Theme> p_theme) { df_output_code->set_font_data(dfmono); MAKE_FALLBACKS(df_output_code); p_theme->set_font("status_source", "EditorFonts", df_output_code); - - //replace default theme - Ref<Texture> di; - Ref<StyleBox> ds; - fill_default_theme(p_theme, df, df_doc, di, ds, EDSCALE); } diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 29859a1a56..de0c3f55cc 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -801,6 +801,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_constant("close_h_ofs", "WindowDialog", 22 * EDSCALE); theme->set_constant("close_v_ofs", "WindowDialog", 20 * EDSCALE); theme->set_constant("title_height", "WindowDialog", 24 * EDSCALE); + theme->set_font("title_font", "WindowDialog", theme->get_font("title", "EditorFonts")); // complex window, for now only Editor settings and Project settings Ref<StyleBoxFlat> style_complex_window = style_window->duplicate(); @@ -1044,7 +1045,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { } Ref<Theme> create_custom_theme() { - Ref<Theme> theme; + Ref<Theme> theme = create_editor_theme(); String custom_theme = EditorSettings::get_singleton()->get("interface/theme/custom_theme"); if (custom_theme != "") { diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 18416868ec..5bfdd73aad 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -1053,7 +1053,7 @@ void ProjectManager::_load_recent_projects() { ec->set_custom_minimum_size(Size2(0, 1)); vb->add_child(ec); Label *title = memnew(Label(project_name)); - title->add_font_override("font", gui_base->get_font("large", "Fonts")); + title->add_font_override("font", gui_base->get_font("title", "EditorFonts")); title->add_color_override("font_color", font_color); title->set_clip_text(true); vb->add_child(title); @@ -1492,7 +1492,6 @@ ProjectManager::ProjectManager() { CenterContainer *ccl = memnew(CenterContainer); Label *l = memnew(Label); l->set_text(_MKSTR(VERSION_NAME) + String(" - ") + TTR("Project Manager")); - l->add_font_override("font", gui_base->get_font("doc", "EditorFonts")); ccl->add_child(l); top_hb->add_child(ccl); top_hb->add_spacer(); diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index f4d5530faa..002ae568ff 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -4258,7 +4258,7 @@ PropertyEditor::PropertyEditor() { use_filter = false; subsection_selectable = false; property_selectable = false; - show_type_icons = EDITOR_DEF("interface/editor/show_type_icons", false); + show_type_icons = false; // maybe one day will return. } PropertyEditor::~PropertyEditor() { |