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
|
@ -23,7 +23,7 @@ use std::ops::DerefMut;
|
|||
use std::time::Duration;
|
||||
use std::{ops::Range, sync::Arc};
|
||||
use theme::ThemeSettings;
|
||||
use ui::{popover_menu, prelude::*, ContextMenu, ToggleButton, Tooltip};
|
||||
use ui::{prelude::*, ContextMenu, PopoverMenu, ToggleButton, Tooltip};
|
||||
use util::ResultExt as _;
|
||||
use workspace::item::TabContentParams;
|
||||
use workspace::{
|
||||
|
@ -526,23 +526,26 @@ impl ExtensionsPage {
|
|||
.tooltip(move |cx| Tooltip::text(repository_url.clone(), cx)),
|
||||
)
|
||||
.child(
|
||||
popover_menu(SharedString::from(format!("more-{}", extension.id)))
|
||||
.trigger(
|
||||
IconButton::new(
|
||||
SharedString::from(format!("more-{}", extension.id)),
|
||||
IconName::Ellipsis,
|
||||
)
|
||||
.icon_color(Color::Accent)
|
||||
.icon_size(IconSize::Small)
|
||||
.style(ButtonStyle::Filled),
|
||||
PopoverMenu::new(SharedString::from(format!(
|
||||
"more-{}",
|
||||
extension.id
|
||||
)))
|
||||
.trigger(
|
||||
IconButton::new(
|
||||
SharedString::from(format!("more-{}", extension.id)),
|
||||
IconName::Ellipsis,
|
||||
)
|
||||
.menu(move |cx| {
|
||||
Some(Self::render_remote_extension_context_menu(
|
||||
&this,
|
||||
extension_id.clone(),
|
||||
cx,
|
||||
))
|
||||
}),
|
||||
.icon_color(Color::Accent)
|
||||
.icon_size(IconSize::Small)
|
||||
.style(ButtonStyle::Filled),
|
||||
)
|
||||
.menu(move |cx| {
|
||||
Some(Self::render_remote_extension_context_menu(
|
||||
&this,
|
||||
extension_id.clone(),
|
||||
cx,
|
||||
))
|
||||
}),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue