Fix bad popups offset in editor with single window off
Co-authored-by: Gil Arasa Verge <gilarasaverge@gmail.com> Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
This commit is contained in:
@@ -1291,7 +1291,8 @@ void Node3DEditorViewport::_list_select(Ref<InputEventMouseButton> b) {
|
||||
selection_menu->set_item_tooltip(i, String(spat->get_name()) + "\nType: " + spat->get_class() + "\nPath: " + node_path);
|
||||
}
|
||||
|
||||
selection_menu->set_position(get_screen_transform().xform(b->get_position()));
|
||||
selection_menu->set_position(get_screen_position() + b->get_position());
|
||||
selection_menu->reset_size();
|
||||
selection_menu->popup();
|
||||
}
|
||||
}
|
||||
@@ -6646,6 +6647,7 @@ void Node3DEditor::unhandled_key_input(const Ref<InputEvent> &p_event) {
|
||||
void Node3DEditor::_sun_environ_settings_pressed() {
|
||||
Vector2 pos = sun_environ_settings->get_screen_position() + sun_environ_settings->get_size();
|
||||
sun_environ_popup->set_position(pos - Vector2(sun_environ_popup->get_contents_minimum_size().width / 2, 0));
|
||||
sun_environ_popup->reset_size();
|
||||
sun_environ_popup->popup();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user