Merge branch 'main' of github.com:zed-industries/zed into project_search_design
This commit is contained in:
commit
d727ba18f2
90 changed files with 2308 additions and 1113 deletions
|
@ -234,7 +234,7 @@ fn nav_button<A: Action, F: 'static + Fn(&mut Pane, &mut ViewContext<Pane>)>(
|
|||
action_name: &str,
|
||||
cx: &mut ViewContext<Pane>,
|
||||
) -> AnyElement<Pane> {
|
||||
MouseEventHandler::<A, _>::new(0, cx, |state, _| {
|
||||
MouseEventHandler::new::<A, _>(0, cx, |state, _| {
|
||||
let style = if enabled {
|
||||
style.style_for(state)
|
||||
} else {
|
||||
|
@ -1317,7 +1317,7 @@ impl Pane {
|
|||
|
||||
enum Tab {}
|
||||
let mouse_event_handler =
|
||||
MouseEventHandler::<Tab, Pane>::new(ix, cx, |_, cx| {
|
||||
MouseEventHandler::new::<Tab, _>(ix, cx, |_, cx| {
|
||||
Self::render_tab(
|
||||
&item,
|
||||
pane.clone(),
|
||||
|
@ -1526,7 +1526,7 @@ impl Pane {
|
|||
let item_id = item.id();
|
||||
enum TabCloseButton {}
|
||||
let icon = Svg::new("icons/x_mark_8.svg");
|
||||
MouseEventHandler::<TabCloseButton, _>::new(item_id, cx, |mouse_state, _| {
|
||||
MouseEventHandler::new::<TabCloseButton, _>(item_id, cx, |mouse_state, _| {
|
||||
if mouse_state.hovered() {
|
||||
icon.with_color(tab_style.icon_close_active)
|
||||
} else {
|
||||
|
@ -1591,7 +1591,7 @@ impl Pane {
|
|||
) -> AnyElement<Pane> {
|
||||
enum TabBarButton {}
|
||||
|
||||
let mut button = MouseEventHandler::<TabBarButton, _>::new(index, cx, |mouse_state, cx| {
|
||||
let mut button = MouseEventHandler::new::<TabBarButton, _>(index, cx, |mouse_state, cx| {
|
||||
let theme = &settings::get::<ThemeSettings>(cx).theme.workspace.tab_bar;
|
||||
let style = theme.pane_button.in_state(is_active).style_for(mouse_state);
|
||||
Svg::new(icon)
|
||||
|
@ -1653,7 +1653,7 @@ impl View for Pane {
|
|||
fn render(&mut self, cx: &mut ViewContext<Self>) -> AnyElement<Self> {
|
||||
enum MouseNavigationHandler {}
|
||||
|
||||
MouseEventHandler::<MouseNavigationHandler, _>::new(0, cx, |_, cx| {
|
||||
MouseEventHandler::new::<MouseNavigationHandler, _>(0, cx, |_, cx| {
|
||||
let active_item_index = self.active_item_index;
|
||||
|
||||
if let Some(active_item) = self.active_item() {
|
||||
|
@ -1665,7 +1665,7 @@ impl View for Pane {
|
|||
|
||||
enum TabBarEventHandler {}
|
||||
stack.add_child(
|
||||
MouseEventHandler::<TabBarEventHandler, _>::new(0, cx, |_, _| {
|
||||
MouseEventHandler::new::<TabBarEventHandler, _>(0, cx, |_, _| {
|
||||
Empty::new()
|
||||
.contained()
|
||||
.with_style(theme.workspace.tab_bar.container)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue