Merge branch 'main' into zed2-breadcrumbs

This commit is contained in:
Julia
2023-12-01 12:28:36 -05:00
10 changed files with 746 additions and 326 deletions
+6 -6
View File
@@ -7,8 +7,8 @@ use gpui::{
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use std::sync::Arc;
use ui::prelude::*;
use ui::{h_stack, menu_handle, ContextMenu, IconButton, Tooltip};
use ui::{h_stack, ContextMenu, IconButton, Tooltip};
use ui::{prelude::*, right_click_menu};
pub enum PanelEvent {
ChangePosition,
@@ -702,7 +702,7 @@ impl Render for PanelButtons {
};
Some(
menu_handle(name)
right_click_menu(name)
.menu(move |cx| {
const POSITIONS: [DockPosition; 3] = [
DockPosition::Left,
@@ -726,14 +726,14 @@ impl Render for PanelButtons {
})
.anchor(menu_anchor)
.attach(menu_attach)
.child(move |_is_open| {
.trigger(
IconButton::new(name, icon)
.selected(is_active_button)
.action(action.boxed_clone())
.tooltip(move |cx| {
Tooltip::for_action(tooltip.clone(), &*action, cx)
})
}),
}),
),
)
});
+2 -2
View File
@@ -26,7 +26,7 @@ use std::{
},
};
use ui::{menu_handle, prelude::*, Color, Icon, IconButton, IconElement, Tooltip};
use ui::{prelude::*, right_click_menu, Color, Icon, IconButton, IconElement, Tooltip};
use ui::{v_stack, ContextMenu};
use util::truncate_and_remove_front;
@@ -1524,7 +1524,7 @@ impl Pane {
.children(close_right.then(|| close_icon())),
);
menu_handle(ix).child(|_| tab).menu(|cx| {
right_click_menu(ix).trigger(tab).menu(|cx| {
ContextMenu::build(cx, |menu, cx| {
menu.action(
"Close Active Item",
+2
View File
@@ -3638,6 +3638,8 @@ impl Render for Workspace {
.items_start()
.text_color(cx.theme().colors().text)
.bg(cx.theme().colors().background)
.border()
.border_color(cx.theme().colors().border)
.children(self.titlebar_item.clone())
.child(
div()