diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-07-19 15:20:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-19 15:20:25 +0200 |
commit | 855c7c7414a2f29cd420e8dd654a4630226bcd50 (patch) | |
tree | 343caeb7b32ef068f50a69e91dad2a8aefe681fb /editor/editor_themes.cpp | |
parent | 54b598ffe4f1ba5cc55c947a2cb5192829770088 (diff) | |
parent | 6631f66c2a9d54dc80d57df60376c84ce1252d08 (diff) |
Merge pull request #50566 from reduz/optimize-stringname-usage
Optimize StringName usage
Diffstat (limited to 'editor/editor_themes.cpp')
-rw-r--r-- | editor/editor_themes.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 427f079669..cea8081a5f 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -996,7 +996,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_stylebox("DebuggerPanel", "EditorStyles", style_panel_debugger); Ref<StyleBoxFlat> style_panel_invisible_top = style_content_panel->duplicate(); - int stylebox_offset = theme->get_font("tab_selected", "TabContainer")->get_height(theme->get_font_size("tab_selected", "TabContainer")) + theme->get_stylebox("tab_selected", "TabContainer")->get_minimum_size().height + theme->get_stylebox("panel", "TabContainer")->get_default_margin(SIDE_TOP); + int stylebox_offset = theme->get_font("tab_selected", "TabContainer")->get_height(theme->get_font_size("tab_selected", "TabContainer")) + theme->get_stylebox(SNAME("tab_selected"), SNAME("TabContainer"))->get_minimum_size().height + theme->get_stylebox(SNAME("panel"), SNAME("TabContainer"))->get_default_margin(SIDE_TOP); style_panel_invisible_top->set_expand_margin_size(SIDE_TOP, -stylebox_offset); style_panel_invisible_top->set_default_margin(SIDE_TOP, 0); theme->set_stylebox("BottomPanelDebuggerOverride", "EditorStyles", style_panel_invisible_top); |