diff options
author | Haoyu Qiu <timothyqiu32@gmail.com> | 2022-08-11 17:59:27 +0800 |
---|---|---|
committer | Haoyu Qiu <timothyqiu32@gmail.com> | 2022-08-11 18:00:34 +0800 |
commit | 3369d090d9804aa2141600b6fcdaa18f6113fd48 (patch) | |
tree | 0e23411a33cd34915a70fbf94b0f72a84353e3ec /editor | |
parent | e9e9e92e4864f9dc34e24f37cb93c88cc3649104 (diff) | |
download | redot-engine-3369d090d9804aa2141600b6fcdaa18f6113fd48.tar.gz |
Fix overlapping keying and remove button in Inspector
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_inspector.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index b4e36d568d..8fe0f30855 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -340,6 +340,8 @@ void EditorProperty::_notification(int p_what) { draw_string(font, Point2(ofs, v_ofs + font->get_ascent(font_size)), label, HORIZONTAL_ALIGNMENT_LEFT, text_limit, font_size, color); } + ofs = size.width; + if (keying) { Ref<Texture2D> key; @@ -349,7 +351,7 @@ void EditorProperty::_notification(int p_what) { key = get_theme_icon(SNAME("Key"), SNAME("EditorIcons")); } - ofs = size.width - key->get_width() - get_theme_constant(SNAME("hseparator"), SNAME("Tree")); + ofs -= key->get_width() + get_theme_constant(SNAME("hseparator"), SNAME("Tree")); Color color2(1, 1, 1); if (keying_hover) { @@ -373,7 +375,7 @@ void EditorProperty::_notification(int p_what) { close = get_theme_icon(SNAME("Close"), SNAME("EditorIcons")); - ofs = size.width - close->get_width() - get_theme_constant(SNAME("hseparator"), SNAME("Tree")); + ofs -= close->get_width() + get_theme_constant(SNAME("hseparator"), SNAME("Tree")); Color color2(1, 1, 1); if (delete_hover) { |