MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / initialize_category_theme

Method initialize_category_theme

editor/inspector/editor_inspector.cpp:3498–3519  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3496}
3497
3498void EditorInspector::initialize_category_theme(EditorInspectorCategory::ThemeCache &p_cache, Control *p_control) {
3499 EditorInspector *parent_inspector = _get_control_parent_inspector(p_control);
3500 if (parent_inspector && parent_inspector != p_control) {
3501 p_cache = parent_inspector->category_theme_cache;
3502 return;
3503 }
3504
3505 p_cache.horizontal_separation = p_control->get_theme_constant(SNAME("h_separation"), SNAME("Tree"));
3506 p_cache.vertical_separation = p_control->get_theme_constant(SNAME("v_separation"), SNAME("Tree"));
3507 p_cache.class_icon_size = p_control->get_theme_constant(SNAME("class_icon_size"), EditorStringName(Editor));
3508
3509 p_cache.font_color = p_control->get_theme_color(SceneStringName(font_color), SNAME("Tree"));
3510
3511 p_cache.bold_font = p_control->get_theme_font(SNAME("bold"), EditorStringName(EditorFonts));
3512 p_cache.bold_font_size = p_control->get_theme_font_size(SNAME("bold_size"), EditorStringName(EditorFonts));
3513
3514 p_cache.icon_favorites = p_control->get_editor_theme_icon(SNAME("Favorites"));
3515 p_cache.icon_unfavorite = p_control->get_editor_theme_icon(SNAME("Unfavorite"));
3516 p_cache.icon_help = p_control->get_editor_theme_icon(SNAME("Help"));
3517
3518 p_cache.background = p_control->get_theme_stylebox(SNAME("bg"), SNAME("EditorInspectorCategory"));
3519}
3520
3521void EditorInspector::add_inspector_plugin(const Ref<EditorInspectorPlugin> &p_plugin) {
3522 ERR_FAIL_COND(inspector_plugin_count == MAX_PLUGINS);

Callers

nothing calls this directly

Calls 6

get_theme_constantMethod · 0.45
get_theme_colorMethod · 0.45
get_theme_fontMethod · 0.45
get_theme_font_sizeMethod · 0.45
get_editor_theme_iconMethod · 0.45
get_theme_styleboxMethod · 0.45

Tested by

no test coverage detected