Titlebar project menu double click (#3784)

This addresses a bug where popover menus in the titlebar were rendered
only after a 2nd click. The first click was creating the View which the
second one then rendered.
In addition to this, `PopoverMenu::menu` function argument can now
return an `Option<View<T>>` instead of `View<T>` as the creation of the
menu can fail (as it might in case of git popover).

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2023-12-22 17:18:12 +01:00 committed by GitHub
parent 172e434bec
commit dc1ed3c39d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 67 additions and 126 deletions

View file

@ -828,6 +828,7 @@ impl Render for LspLogToolbarItemView {
}
menu
})
.into()
});
h_stack().size_full().child(lsp_menu).child(

View file

@ -467,6 +467,7 @@ impl SyntaxTreeToolbarItemView {
}
menu
})
.into()
}),
)
}