summaryrefslogtreecommitdiffstats
path: root/editor/plugins/animation_library_editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/animation_library_editor.cpp')
-rw-r--r--editor/plugins/animation_library_editor.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/plugins/animation_library_editor.cpp b/editor/plugins/animation_library_editor.cpp
index 38f8b16b34..4e8a1bd89b 100644
--- a/editor/plugins/animation_library_editor.cpp
+++ b/editor/plugins/animation_library_editor.cpp
@@ -598,7 +598,7 @@ void AnimationLibraryEditor::_button_pressed(TreeItem *p_item, int p_column, int
file_popup->add_separator();
file_popup->add_item(TTR("Open in Inspector"), FILE_MENU_EDIT_LIBRARY);
Rect2 pos = tree->get_item_rect(p_item, 1, 0);
- Vector2 popup_pos = tree->get_screen_transform().xform(pos.position + Vector2(0, pos.size.height));
+ Vector2 popup_pos = tree->get_screen_transform().xform(pos.position + Vector2(0, pos.size.height)) - tree->get_scroll();
file_popup->popup(Rect2(popup_pos, Size2()));
file_dialog_animation = StringName();
@@ -638,7 +638,7 @@ void AnimationLibraryEditor::_button_pressed(TreeItem *p_item, int p_column, int
file_popup->add_separator();
file_popup->add_item(TTR("Open in Inspector"), FILE_MENU_EDIT_ANIMATION);
Rect2 pos = tree->get_item_rect(p_item, 1, 0);
- Vector2 popup_pos = tree->get_screen_transform().xform(pos.position + Vector2(0, pos.size.height));
+ Vector2 popup_pos = tree->get_screen_transform().xform(pos.position + Vector2(0, pos.size.height)) - tree->get_scroll();
file_popup->popup(Rect2(popup_pos, Size2()));
file_dialog_animation = anim_name;
@@ -773,8 +773,8 @@ void AnimationLibraryEditor::show_dialog() {
void AnimationLibraryEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_THEME_CHANGED: {
- new_library_button->set_icon(get_editor_theme_icon(SNAME("Add")));
- load_library_button->set_icon(get_editor_theme_icon(SNAME("Load")));
+ new_library_button->set_button_icon(get_editor_theme_icon(SNAME("Add")));
+ load_library_button->set_button_icon(get_editor_theme_icon(SNAME("Load")));
}
}
}