diff options
| author | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2020-12-22 16:24:29 +0000 |
|---|---|---|
| committer | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2020-12-23 06:25:56 +0000 |
| commit | 4b8b8039316493ee3fa77c6bb93f95e109fa68a6 (patch) | |
| tree | 5b13e0f4216218ccebb1e2584bae32b5bd2d6714 /editor/editor_properties.cpp | |
| parent | 30d469a5e0f70860f3c4ce4508d6564ca389320b (diff) | |
| download | redot-engine-4b8b8039316493ee3fa77c6bb93f95e109fa68a6.tar.gz | |
Rename Control margin to offset
Diffstat (limited to 'editor/editor_properties.cpp')
| -rw-r--r-- | editor/editor_properties.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 523e65babe..f432d52bf6 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -2590,7 +2590,7 @@ void EditorPropertyResource::_resource_preview(const String &p_path, const Ref<T } if (p_preview.is_valid()) { - preview->set_margin(MARGIN_LEFT, assign->get_icon()->get_width() + assign->get_theme_stylebox("normal")->get_default_margin(MARGIN_LEFT) + get_theme_constant("hseparation", "Button")); + preview->set_offset(SIDE_LEFT, assign->get_icon()->get_width() + assign->get_theme_stylebox("normal")->get_default_margin(SIDE_LEFT) + get_theme_constant("hseparation", "Button")); if (type == "GradientTexture") { preview->set_stretch_mode(TextureRect::STRETCH_SCALE); assign->set_custom_minimum_size(Size2(1, 1)); @@ -3167,10 +3167,10 @@ EditorPropertyResource::EditorPropertyResource() { preview = memnew(TextureRect); preview->set_expand(true); - preview->set_anchors_and_margins_preset(PRESET_WIDE); - preview->set_margin(MARGIN_TOP, 1); - preview->set_margin(MARGIN_BOTTOM, -1); - preview->set_margin(MARGIN_RIGHT, -1); + preview->set_anchors_and_offsets_preset(PRESET_WIDE); + preview->set_offset(SIDE_TOP, 1); + preview->set_offset(SIDE_BOTTOM, -1); + preview->set_offset(SIDE_RIGHT, -1); assign->add_child(preview); assign->connect("gui_input", callable_mp(this, &EditorPropertyResource::_button_input)); |
