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

Method initialize_section_theme

editor/inspector/editor_inspector.cpp:3460–3496  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3458}
3459
3460void EditorInspector::initialize_section_theme(EditorInspectorSection::ThemeCache &p_cache, Control *p_control) {
3461 EditorInspector *parent_inspector = _get_control_parent_inspector(p_control);
3462 if (parent_inspector && parent_inspector != p_control) {
3463 p_cache = parent_inspector->section_theme_cache;
3464 return;
3465 }
3466
3467 p_cache.horizontal_separation = p_control->get_theme_constant(SNAME("h_separation"), SNAME("EditorInspectorSection"));
3468 p_cache.vertical_separation = p_control->get_theme_constant(SNAME("v_separation"), SNAME("Tree"));
3469 p_cache.inspector_margin = p_control->get_theme_constant(SNAME("inspector_margin"), EditorStringName(Editor));
3470 p_cache.indent_size = p_control->get_theme_constant(SNAME("indent_size"), SNAME("EditorInspectorSection"));
3471
3472 p_cache.warning_color = p_control->get_theme_color(SNAME("warning_color"), EditorStringName(Editor));
3473 p_cache.prop_subsection = p_control->get_theme_color(SNAME("prop_subsection"), EditorStringName(Editor));
3474 p_cache.font_color = p_control->get_theme_color(SceneStringName(font_color), EditorStringName(Editor));
3475 p_cache.font_disabled_color = p_control->get_theme_color(SNAME("font_disabled_color"), EditorStringName(Editor));
3476 p_cache.font_hover_color = p_control->get_theme_color(SNAME("font_hover_color"), EditorStringName(Editor));
3477 p_cache.font_pressed_color = p_control->get_theme_color(SNAME("font_pressed_color"), EditorStringName(Editor));
3478 p_cache.font_hover_pressed_color = p_control->get_theme_color(SNAME("font_hover_pressed_color"), EditorStringName(Editor));
3479
3480 p_cache.font = p_control->get_theme_font(SceneStringName(font), SNAME("Tree"));
3481 p_cache.font_size = p_control->get_theme_font_size(SceneStringName(font_size), SNAME("Tree"));
3482 p_cache.bold_font = p_control->get_theme_font(SNAME("bold"), EditorStringName(EditorFonts));
3483 p_cache.bold_font_size = p_control->get_theme_font_size(SNAME("bold_size"), EditorStringName(EditorFonts));
3484 p_cache.light_font = p_control->get_theme_font(SNAME("main"), EditorStringName(EditorFonts));
3485 p_cache.light_font_size = p_control->get_theme_font_size(SNAME("main_size"), EditorStringName(EditorFonts));
3486
3487 p_cache.arrow = p_control->get_theme_icon(SNAME("arrow"), SNAME("Tree"));
3488 p_cache.arrow_collapsed = p_control->get_theme_icon(SNAME("arrow_collapsed"), SNAME("Tree"));
3489 p_cache.arrow_collapsed_mirrored = p_control->get_theme_icon(SNAME("arrow_collapsed_mirrored"), SNAME("Tree"));
3490 p_cache.icon_gui_checked = p_control->get_editor_theme_icon(SNAME("GuiChecked"));
3491 p_cache.icon_gui_unchecked = p_control->get_editor_theme_icon(SNAME("GuiUnchecked"));
3492 p_cache.icon_gui_animation_key = p_control->get_editor_theme_icon(SNAME("Key"));
3493
3494 p_cache.indent_box = p_control->get_theme_stylebox(SNAME("indent_box"), SNAME("EditorInspectorSection"));
3495 p_cache.key_hover = p_control->get_theme_stylebox(SceneStringName(hover), "Button");
3496}
3497
3498void EditorInspector::initialize_category_theme(EditorInspectorCategory::ThemeCache &p_cache, Control *p_control) {
3499 EditorInspector *parent_inspector = _get_control_parent_inspector(p_control);

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected