summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-12-02 18:09:34 +0100
committerGitHub <noreply@github.com>2018-12-02 18:09:34 +0100
commitf730d183c7e071e33b1860625849d3336ffd82ca (patch)
tree167c09ed941821e4d5ca14f303953668adb45956
parentcda28f507756ac0333a8609d66da10dc23664851 (diff)
parent2015c741047d32d9be0e4523cdf92e0f48aeaa08 (diff)
Merge pull request #24085 from guilhermefelipecgs/fix_layout
Fix key icon overlapping revert icon
-rw-r--r--editor/editor_inspector.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index b50af93352..10c9974cdd 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -128,18 +128,22 @@ void EditorProperty::_notification(int p_what) {
bottom_rect = Rect2(m, rect.size.height + get_constant("vseparation", "Tree"), size.width - m, bottom_editor->get_combined_minimum_size().height);
}
- }
- if (keying) {
- Ref<Texture> key;
+ if (keying) {
+ Ref<Texture> key;
- if (use_keying_next()) {
- key = get_icon("KeyNext", "EditorIcons");
- } else {
- key = get_icon("Key", "EditorIcons");
- }
+ if (use_keying_next()) {
+ key = get_icon("KeyNext", "EditorIcons");
+ } else {
+ key = get_icon("Key", "EditorIcons");
+ }
- rect.size.x -= key->get_width() + get_constant("hseparator", "Tree");
+ rect.size.x -= key->get_width() + get_constant("hseparator", "Tree");
+
+ if (no_children) {
+ text_size -= key->get_width() + 4 * EDSCALE;
+ }
+ }
}
//set children