From b60c5c4b04f0730250f4fd3674f2e72f268beae3 Mon Sep 17 00:00:00 2001 From: TomZz Date: Sun, 8 Nov 2026 12:33:28 +0800 Subject: [PATCH] =?UTF-8?q?fix(app):=20=E4=BF=AE=E5=A4=8D=E8=9E=8D?= =?UTF-8?q?=E5=90=88=E6=A0=87=E9=A2=98=E6=A0=8F=E4=B8=8B=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5=20tab=20=E5=AE=B9=E6=98=93=E8=A2=AB=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E6=8B=96=E5=8A=A8=E5=90=9E=E6=8E=89=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20(#122)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/ui.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/app/ui.rs b/src/app/ui.rs index d0f1a1b..acf37bb 100644 --- a/src/app/ui.rs +++ b/src/app/ui.rs @@ -4458,6 +4458,10 @@ impl Ashell { IconName::PanelLeftClose }) .tooltip(t!("settings_toggle_sidebar").to_string()) + .on_mouse_down(MouseButton::Left, |_, window, cx| { + window.prevent_default(); + cx.stop_propagation(); + }) .on_click(cx.listener(|this, _, _, cx| { this.sidebar_collapsed = !this.sidebar_collapsed; this.is_layout_reset = false; @@ -4657,8 +4661,10 @@ impl Ashell { ), ) .cursor_pointer() - .on_mouse_down(MouseButton::Left, |_, window, _| { + .on_mouse_down(MouseButton::Left, |_, window, cx| { window.prevent_default(); + // 阻止冒泡到融合标题栏的窗口拖动区,避免点击被拖动吞掉 + cx.stop_propagation(); }) .on_click(cx.listener( move |this, _, window, cx| { @@ -4689,6 +4695,10 @@ impl Ashell { .items_center() .gap_1() .pr(px(6.)) + .on_mouse_down(MouseButton::Left, |_, window, cx| { + window.prevent_default(); + cx.stop_propagation(); + }) .child( pointer_button("open-selector") .ghost()