Fix graph node sizing regression, improve blend tree contrast/margins

This commit is contained in:
Christian Kaiser 2024-07-20 22:22:51 -03:00
parent f952bfe998
commit 5559075844
3 changed files with 22 additions and 12 deletions

View file

@ -46,6 +46,7 @@
#include "editor/plugins/material_editor_plugin.h"
#include "editor/plugins/shader_editor_plugin.h"
#include "editor/themes/editor_scale.h"
#include "editor/themes/editor_theme_manager.h"
#include "scene/animation/tween.h"
#include "scene/gui/button.h"
#include "scene/gui/check_box.h"
@ -572,6 +573,10 @@ void VisualShaderGraphPlugin::update_theme() {
Ref<Font> label_bold_font = EditorNode::get_singleton()->get_editor_theme()->get_font("main_bold_msdf", EditorStringName(EditorFonts));
vs_msdf_fonts_theme->set_font(SceneStringName(font), "Label", label_font);
vs_msdf_fonts_theme->set_font(SceneStringName(font), "GraphNodeTitleLabel", label_bold_font);
if (!EditorThemeManager::is_dark_theme()) {
// Override the color to white for light themes.
vs_msdf_fonts_theme->set_color(SceneStringName(font_color), "GraphNodeTitleLabel", Color(1, 1, 1));
}
vs_msdf_fonts_theme->set_font(SceneStringName(font), "LineEdit", label_font);
vs_msdf_fonts_theme->set_font(SceneStringName(font), "Button", label_font);
}