Move PopoverButton
into ui
(#25724)
This PR moves the `PopoverButton` component into the `ui` crate. The `popover_button` crate only depended on `ui`, so there doesn't seem to be a need for it to live in its own crate and add another step in the crate graph. Release Notes: - N/A
This commit is contained in:
parent
3505a17452
commit
da22f21dec
11 changed files with 13 additions and 47 deletions
|
@ -33,7 +33,6 @@ menu.workspace = true
|
|||
multi_buffer.workspace = true
|
||||
panel.workspace = true
|
||||
picker.workspace = true
|
||||
popover_button.workspace = true
|
||||
postage.workspace = true
|
||||
project.workspace = true
|
||||
schemars.workspace = true
|
||||
|
|
|
@ -10,7 +10,9 @@ use gpui::{
|
|||
use picker::{Picker, PickerDelegate};
|
||||
use project::{Project, ProjectPath};
|
||||
use std::sync::Arc;
|
||||
use ui::{prelude::*, HighlightedLabel, ListItem, ListItemSpacing, PopoverMenuHandle};
|
||||
use ui::{
|
||||
prelude::*, HighlightedLabel, ListItem, ListItemSpacing, PopoverMenuHandle, TriggerablePopover,
|
||||
};
|
||||
use util::ResultExt;
|
||||
use workspace::notifications::DetachAndPromptErr;
|
||||
use workspace::{ModalView, Workspace};
|
||||
|
@ -78,7 +80,7 @@ pub struct BranchList {
|
|||
_subscription: Option<Subscription>,
|
||||
}
|
||||
|
||||
impl popover_button::TriggerablePopover for BranchList {
|
||||
impl TriggerablePopover for BranchList {
|
||||
fn menu_handle(
|
||||
&mut self,
|
||||
_window: &mut Window,
|
||||
|
|
|
@ -4,9 +4,8 @@ use crate::branch_picker::{self, BranchList};
|
|||
use crate::git_panel::{commit_message_editor, GitPanel};
|
||||
use git::Commit;
|
||||
use panel::{panel_button, panel_editor_style, panel_filled_button};
|
||||
use popover_button::TriggerablePopover;
|
||||
use project::Project;
|
||||
use ui::{prelude::*, KeybindingHint, Tooltip};
|
||||
use ui::{prelude::*, KeybindingHint, PopoverButton, Tooltip, TriggerablePopover};
|
||||
|
||||
use editor::{Editor, EditorElement};
|
||||
use gpui::*;
|
||||
|
@ -288,7 +287,7 @@ impl CommitModal {
|
|||
}))
|
||||
.style(ButtonStyle::Transparent);
|
||||
|
||||
let branch_picker = popover_button::PopoverButton::new(
|
||||
let branch_picker = PopoverButton::new(
|
||||
self.branch_list.clone(),
|
||||
Corner::BottomLeft,
|
||||
branch_picker_button,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue