ui: Use PopoverMenu::new
for constructing PopoverMenu
s (#13178)
This PR replaces the `popover_menu` function for constructing `PopoverMenu`s with a `PopoverMenu::new` associated function. This brings `PopoverMenu` in line with our other UI components. Release Notes: - N/A
This commit is contained in:
parent
59104a08fd
commit
78e0f71a28
9 changed files with 53 additions and 50 deletions
|
@ -21,7 +21,7 @@ use workspace::{
|
|||
item::ItemHandle,
|
||||
notifications::NotificationId,
|
||||
ui::{
|
||||
popover_menu, ButtonCommon, Clickable, ContextMenu, IconButton, IconName, IconSize, Tooltip,
|
||||
ButtonCommon, Clickable, ContextMenu, IconButton, IconName, IconSize, PopoverMenu, Tooltip,
|
||||
},
|
||||
StatusItemView, Toast, Workspace,
|
||||
};
|
||||
|
@ -112,7 +112,7 @@ impl Render for InlineCompletionButton {
|
|||
let this = cx.view().clone();
|
||||
|
||||
div().child(
|
||||
popover_menu("copilot")
|
||||
PopoverMenu::new("copilot")
|
||||
.menu(move |cx| {
|
||||
Some(match status {
|
||||
Status::Authorized => {
|
||||
|
@ -161,7 +161,7 @@ impl Render for InlineCompletionButton {
|
|||
let this = cx.view().clone();
|
||||
|
||||
return div().child(
|
||||
popover_menu("supermaven")
|
||||
PopoverMenu::new("supermaven")
|
||||
.menu(move |cx| match &status {
|
||||
SupermavenButtonStatus::NeedsActivation(activate_url) => {
|
||||
Some(ContextMenu::build(cx, |menu, _| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue