Remove extra space in property editors

- NodePath, Resource, and multiline string
This commit is contained in:
FireForge 2022-05-25 19:04:44 -05:00
parent f880904c7a
commit e5db39d07b
3 changed files with 9 additions and 8 deletions

View file

@ -156,6 +156,7 @@ void EditorPropertyMultilineText::_bind_methods() {
EditorPropertyMultilineText::EditorPropertyMultilineText() {
HBoxContainer *hb = memnew(HBoxContainer);
hb->add_constant_override("separation", 0);
add_child(hb);
set_bottom_editor(hb);
text = memnew(TextEdit);
@ -2346,6 +2347,7 @@ void EditorPropertyNodePath::_bind_methods() {
EditorPropertyNodePath::EditorPropertyNodePath() {
HBoxContainer *hbc = memnew(HBoxContainer);
hbc->add_constant_override("separation", 0);
add_child(hbc);
assign = memnew(Button);
assign->set_flat(true);

View file

@ -864,6 +864,8 @@ EditorResourcePicker::EditorResourcePicker() {
add_child(edit_menu);
edit_menu->connect("id_pressed", this, "_edit_menu_cbk");
edit_menu->connect("popup_hide", edit_button, "set_pressed", varray(false));
add_constant_override("separation", 0);
}
void EditorScriptPicker::set_create_options(Object *p_menu_node) {

View file

@ -744,14 +744,11 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
sub_inspector_bg = make_flat_stylebox(dark_color_1.linear_interpolate(si_base_color, 0.08), 2, 0, 2, 2);
sub_inspector_bg->set_border_width(MARGIN_LEFT, 2);
sub_inspector_bg->set_border_width(MARGIN_RIGHT, 2);
sub_inspector_bg->set_border_width(MARGIN_BOTTOM, 2);
sub_inspector_bg->set_border_width(MARGIN_TOP, 2);
sub_inspector_bg->set_default_margin(MARGIN_LEFT, 3);
sub_inspector_bg->set_default_margin(MARGIN_RIGHT, 3);
sub_inspector_bg->set_default_margin(MARGIN_BOTTOM, 10);
sub_inspector_bg->set_default_margin(MARGIN_TOP, 5);
sub_inspector_bg->set_border_width_all(2);
sub_inspector_bg->set_default_margin(MARGIN_LEFT, 4 * EDSCALE);
sub_inspector_bg->set_default_margin(MARGIN_RIGHT, 4 * EDSCALE);
sub_inspector_bg->set_default_margin(MARGIN_BOTTOM, 4 * EDSCALE);
sub_inspector_bg->set_default_margin(MARGIN_TOP, 4 * EDSCALE);
sub_inspector_bg->set_border_color(si_base_color * Color(0.7, 0.7, 0.7, 0.8));
sub_inspector_bg->set_draw_center(true);