Skip to content

Commit

Permalink
Merge pull request #61428 from fire-forge/prop-space-3.x
Browse files Browse the repository at this point in the history
[3.x] Remove extra space in property editors
  • Loading branch information
akien-mga authored May 26, 2022
2 parents 83d0e97 + e5db39d commit 340283f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 2 additions & 0 deletions editor/editor_properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions editor/editor_resource_picker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
13 changes: 5 additions & 8 deletions editor/editor_themes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 340283f

Please sign in to comment.