diff options
author | Yuri Sizov <yuris@humnom.net> | 2024-01-30 17:35:46 +0100 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2024-01-30 17:52:08 +0100 |
commit | 4d97c33503bff8c83a82ce3be5f55c0fb577db39 (patch) | |
tree | 46f1f67809efb5501fffc6c40b5c948783d185b1 /editor/themes/editor_fonts.cpp | |
parent | bac037b1e0adc20aa37f2920f586ed9f8ec0e3f0 (diff) | |
download | redot-engine-4d97c33503bff8c83a82ce3be5f55c0fb577db39.tar.gz |
Add a network mode setting to bring the editor offline
This PR also adds default font styles for RichTextLabels
in the editor, and improves the introduction dialog
when you don't have any local projects available.
The offline mode is implemented in the asset library
plugin, alongside some code improvements.
Diffstat (limited to 'editor/themes/editor_fonts.cpp')
-rw-r--r-- | editor/themes/editor_fonts.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/editor/themes/editor_fonts.cpp b/editor/themes/editor_fonts.cpp index a4f72b26e3..3479c67b46 100644 --- a/editor/themes/editor_fonts.cpp +++ b/editor/themes/editor_fonts.cpp @@ -370,6 +370,9 @@ void editor_register_fonts(const Ref<Theme> &p_theme) { Ref<FontVariation> italic_fc = default_fc->duplicate(); italic_fc->set_variation_transform(Transform2D(1.0, 0.2, 0.0, 1.0, 0.0, 0.0)); + Ref<FontVariation> bold_italic_fc = bold_fc->duplicate(); + bold_italic_fc->set_variation_transform(Transform2D(1.0, 0.2, 0.0, 1.0, 0.0, 0.0)); + // Setup theme. p_theme->set_default_font(default_fc); // Default theme font config. @@ -394,6 +397,8 @@ void editor_register_fonts(const Ref<Theme> &p_theme) { p_theme->set_font("font", "MainScreenButton", bold_fc); p_theme->set_font_size("font_size", "MainScreenButton", default_font_size + 2 * EDSCALE); + // Labels. + p_theme->set_font("font", "Label", default_fc); p_theme->set_type_variation("HeaderSmall", "Label"); @@ -408,6 +413,11 @@ void editor_register_fonts(const Ref<Theme> &p_theme) { p_theme->set_font("font", "HeaderLarge", bold_fc); p_theme->set_font_size("font_size", "HeaderLarge", default_font_size + 3 * EDSCALE); + p_theme->set_font("normal_font", "RichTextLabel", default_fc); + p_theme->set_font("bold_font", "RichTextLabel", bold_fc); + p_theme->set_font("italics_font", "RichTextLabel", italic_fc); + p_theme->set_font("bold_italics_font", "RichTextLabel", bold_italic_fc); + // Documentation fonts p_theme->set_font_size("doc_size", EditorStringName(EditorFonts), int(EDITOR_GET("text_editor/help/help_font_size")) * EDSCALE); p_theme->set_font("doc", EditorStringName(EditorFonts), default_fc); |