git add .
Some checks failed
Rust / build (ubuntu-latest, stable) (push) Failing after 2m3s
Rust / build (ubuntu-latest, stable) (pull_request) Failing after 1m36s

This commit is contained in:
2026-01-27 13:38:00 +07:00
parent 4a748ca3d1
commit a39725b1d3
10 changed files with 143 additions and 55 deletions

View File

@@ -657,31 +657,35 @@ impl DockArea {
cx.subscribe_in(
view,
window,
move |_, panel, event, window, cx| match event {
move |_this, panel, event, window, cx| match event {
PanelEvent::ZoomIn => {
let panel = panel.clone();
cx.spawn_in(window, async move |view, window| {
_ = view.update_in(window, |view, window, cx| {
view.update_in(window, |view, window, cx| {
view.set_zoomed_in(panel, window, cx);
cx.notify();
});
})
.ok();
})
.detach();
}
PanelEvent::ZoomOut => cx
.spawn_in(window, async move |view, window| {
PanelEvent::ZoomOut => {
cx.spawn_in(window, async move |view, window| {
_ = view.update_in(window, |view, window, cx| {
view.set_zoomed_out(window, cx);
});
})
.detach(),
.detach();
}
PanelEvent::LayoutChanged => {
cx.spawn_in(window, async move |view, window| {
_ = view.update_in(window, |view, window, cx| {
view.update_in(window, |view, window, cx| {
view.update_toggle_button_tab_panels(window, cx)
});
})
.ok();
})
.detach();
// Emit layout changed event for dock
cx.emit(DockEvent::LayoutChanged);
}
},

View File

@@ -5,6 +5,7 @@ use gpui::{
use ui::button::Button;
use ui::popup_menu::PopupMenu;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum PanelEvent {
ZoomIn,
ZoomOut,

View File

@@ -1113,7 +1113,7 @@ impl TabPanel {
fn on_action_close_panel(
&mut self,
_: &ClosePanel,
_ev: &ClosePanel,
window: &mut Window,
cx: &mut Context<Self>,
) {