Merge pull request #107395 from lodetrick/bottom-panel-margin-fixes

Fix TabContainer Editor theming and remove Debugger style hacks
This commit is contained in:
Thaddeus Crews 2025-10-13 19:28:39 -05:00
commit 58894136b7
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
4 changed files with 11 additions and 30 deletions

View file

@ -65,9 +65,11 @@ EditorDebuggerNode::EditorDebuggerNode() {
singleton = this;
}
add_theme_constant_override("margin_left", -EditorNode::get_singleton()->get_editor_theme()->get_stylebox(SNAME("BottomPanelDebuggerOverride"), EditorStringName(EditorStyles))->get_margin(SIDE_LEFT));
add_theme_constant_override("margin_right", -EditorNode::get_singleton()->get_editor_theme()->get_stylebox(SNAME("BottomPanelDebuggerOverride"), EditorStringName(EditorStyles))->get_margin(SIDE_RIGHT));
add_theme_constant_override("margin_bottom", -EditorNode::get_singleton()->get_editor_theme()->get_stylebox(SNAME("BottomPanelDebuggerOverride"), EditorStringName(EditorStyles))->get_margin(SIDE_BOTTOM));
Ref<StyleBox> bottom_panel_margins = EditorNode::get_singleton()->get_editor_theme()->get_stylebox(SNAME("BottomPanel"), EditorStringName(EditorStyles));
add_theme_constant_override("margin_top", -bottom_panel_margins->get_margin(SIDE_TOP));
add_theme_constant_override("margin_left", -bottom_panel_margins->get_margin(SIDE_LEFT));
add_theme_constant_override("margin_right", -bottom_panel_margins->get_margin(SIDE_RIGHT));
add_theme_constant_override("margin_bottom", -bottom_panel_margins->get_margin(SIDE_BOTTOM));
tabs = memnew(TabContainer);
tabs->set_tabs_visible(false);
@ -331,9 +333,11 @@ void EditorDebuggerNode::_notification(int p_what) {
tabs->add_theme_style_override(SceneStringName(panel), EditorNode::get_singleton()->get_editor_theme()->get_stylebox(SNAME("DebuggerPanel"), EditorStringName(EditorStyles)));
}
add_theme_constant_override("margin_left", -EditorNode::get_singleton()->get_editor_theme()->get_stylebox(SNAME("BottomPanelDebuggerOverride"), EditorStringName(EditorStyles))->get_margin(SIDE_LEFT));
add_theme_constant_override("margin_right", -EditorNode::get_singleton()->get_editor_theme()->get_stylebox(SNAME("BottomPanelDebuggerOverride"), EditorStringName(EditorStyles))->get_margin(SIDE_RIGHT));
add_theme_constant_override("margin_bottom", -EditorNode::get_singleton()->get_editor_theme()->get_stylebox(SNAME("BottomPanelDebuggerOverride"), EditorStringName(EditorStyles))->get_margin(SIDE_BOTTOM));
Ref<StyleBox> bottom_panel_margins = EditorNode::get_singleton()->get_editor_theme()->get_stylebox(SNAME("BottomPanel"), EditorStringName(EditorStyles));
add_theme_constant_override("margin_top", -bottom_panel_margins->get_margin(SIDE_TOP));
add_theme_constant_override("margin_left", -bottom_panel_margins->get_margin(SIDE_LEFT));
add_theme_constant_override("margin_right", -bottom_panel_margins->get_margin(SIDE_RIGHT));
add_theme_constant_override("margin_bottom", -bottom_panel_margins->get_margin(SIDE_BOTTOM));
remote_scene_tree->update_icon_max_width();
} break;