mirror of
https://github.com/rust-kotlin/ashell.git
synced 2026-11-14 08:06:31 +00:00
fix(app): 修复融合标题栏下切换连接 tab 容易被窗口拖动吞掉的问题 (#122)
This commit is contained in:
+11
-1
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user