Merge branch 'main' into story-enhancements

This commit is contained in:
Nate Butler 2023-12-15 10:26:59 -05:00
commit 62ea58618c
71 changed files with 2386 additions and 2696 deletions

View file

@ -50,6 +50,7 @@ pub enum Icon {
CopilotError,
CopilotDisabled,
Dash,
Disconnected,
Envelope,
ExternalLink,
ExclamationTriangle,
@ -129,6 +130,7 @@ impl Icon {
Icon::CopilotError => "icons/copilot_error.svg",
Icon::CopilotDisabled => "icons/copilot_disabled.svg",
Icon::Dash => "icons/dash.svg",
Icon::Disconnected => "icons/disconnected.svg",
Icon::Envelope => "icons/feedback.svg",
Icon::ExclamationTriangle => "icons/warning.svg",
Icon::ExternalLink => "icons/external_link.svg",

View file

@ -182,12 +182,12 @@ impl<M: ManagedView> Element for PopoverMenu<M> {
}
fn paint(
self,
&mut self,
_: Bounds<gpui::Pixels>,
element_state: &mut Self::State,
cx: &mut WindowContext,
) {
if let Some(child) = element_state.child_element.take() {
if let Some(mut child) = element_state.child_element.take() {
child.paint(cx);
}
@ -195,7 +195,7 @@ impl<M: ManagedView> Element for PopoverMenu<M> {
element_state.child_bounds = Some(cx.layout_bounds(child_layout_id));
}
if let Some(menu) = element_state.menu_element.take() {
if let Some(mut menu) = element_state.menu_element.take() {
menu.paint(cx);
if let Some(child_bounds) = element_state.child_bounds {

View file

@ -112,21 +112,21 @@ impl<M: ManagedView> Element for RightClickMenu<M> {
}
fn paint(
self,
&mut self,
bounds: Bounds<gpui::Pixels>,
element_state: &mut Self::State,
cx: &mut WindowContext,
) {
if let Some(child) = element_state.child_element.take() {
if let Some(mut child) = element_state.child_element.take() {
child.paint(cx);
}
if let Some(menu) = element_state.menu_element.take() {
if let Some(mut menu) = element_state.menu_element.take() {
menu.paint(cx);
return;
}
let Some(builder) = self.menu_builder else {
let Some(builder) = self.menu_builder.take() else {
return;
};
let menu = element_state.menu.clone();