Merge branch 'main' into divs
This commit is contained in:
commit
d375f7992d
277 changed files with 19044 additions and 8896 deletions
|
@ -1407,7 +1407,7 @@ impl ProjectPanel {
|
|||
|
||||
let show_editor = details.is_editing && !details.is_processing;
|
||||
|
||||
MouseEventHandler::<Self, _>::new(entry_id.to_usize(), cx, |state, cx| {
|
||||
MouseEventHandler::new::<Self, _>(entry_id.to_usize(), cx, |state, cx| {
|
||||
let mut style = entry_style
|
||||
.in_state(details.is_selected)
|
||||
.style_for(state)
|
||||
|
@ -1519,7 +1519,7 @@ impl View for ProjectPanel {
|
|||
if has_worktree {
|
||||
Stack::new()
|
||||
.with_child(
|
||||
MouseEventHandler::<ProjectPanel, _>::new(0, cx, |_, cx| {
|
||||
MouseEventHandler::new::<ProjectPanel, _>(0, cx, |_, cx| {
|
||||
UniformList::new(
|
||||
self.list.clone(),
|
||||
self.visible_entries
|
||||
|
@ -1563,7 +1563,7 @@ impl View for ProjectPanel {
|
|||
} else {
|
||||
Flex::column()
|
||||
.with_child(
|
||||
MouseEventHandler::<Self, _>::new(2, cx, {
|
||||
MouseEventHandler::new::<Self, _>(2, cx, {
|
||||
let button_style = theme.open_project_button.clone();
|
||||
let context_menu_item_style = theme::current(cx).context_menu.item.clone();
|
||||
move |state, cx| {
|
||||
|
@ -1651,30 +1651,14 @@ impl workspace::dock::Panel for ProjectPanel {
|
|||
.unwrap_or_else(|| settings::get::<ProjectPanelSettings>(cx).default_width)
|
||||
}
|
||||
|
||||
fn set_size(&mut self, size: f32, cx: &mut ViewContext<Self>) {
|
||||
self.width = Some(size);
|
||||
fn set_size(&mut self, size: Option<f32>, cx: &mut ViewContext<Self>) {
|
||||
self.width = size;
|
||||
self.serialize(cx);
|
||||
cx.notify();
|
||||
}
|
||||
|
||||
fn should_zoom_in_on_event(_: &Self::Event) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
fn should_zoom_out_on_event(_: &Self::Event) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
fn is_zoomed(&self, _: &WindowContext) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
fn set_zoomed(&mut self, _: bool, _: &mut ViewContext<Self>) {}
|
||||
|
||||
fn set_active(&mut self, _: bool, _: &mut ViewContext<Self>) {}
|
||||
|
||||
fn icon_path(&self) -> &'static str {
|
||||
"icons/folder_tree_16.svg"
|
||||
fn icon_path(&self, _: &WindowContext) -> Option<&'static str> {
|
||||
Some("icons/project.svg")
|
||||
}
|
||||
|
||||
fn icon_tooltip(&self) -> (String, Option<Box<dyn Action>>) {
|
||||
|
@ -1685,14 +1669,6 @@ impl workspace::dock::Panel for ProjectPanel {
|
|||
matches!(event, Event::DockPositionChanged)
|
||||
}
|
||||
|
||||
fn should_activate_on_event(_: &Self::Event) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
fn should_close_on_event(_: &Self::Event) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
fn has_focus(&self, _: &WindowContext) -> bool {
|
||||
self.has_focus
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue