mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-24 11:01:54 +00:00
Merge pull request #2063 from zed-industries/active-tab-close-icon-pointing-hand
Avoid stomping on tab close icon's cursor style
This commit is contained in:
commit
4678f6e0a5
1 changed files with 44 additions and 43 deletions
|
@ -1150,7 +1150,7 @@ impl Pane {
|
|||
|
||||
row.add_child({
|
||||
enum Tab {}
|
||||
dragged_item_receiver::<Tab, _>(ix, ix, true, None, cx, {
|
||||
let mut receiver = dragged_item_receiver::<Tab, _>(ix, ix, true, None, cx, {
|
||||
let item = item.clone();
|
||||
let pane = pane.clone();
|
||||
let detail = detail.clone();
|
||||
|
@ -1162,12 +1162,13 @@ impl Pane {
|
|||
let hovered = mouse_state.hovered();
|
||||
Self::render_tab(&item, pane, ix == 0, detail, hovered, tab_style, cx)
|
||||
}
|
||||
})
|
||||
.with_cursor_style(if pane_active && tab_active {
|
||||
CursorStyle::Arrow
|
||||
} else {
|
||||
CursorStyle::PointingHand
|
||||
})
|
||||
});
|
||||
|
||||
if !pane_active || !tab_active {
|
||||
receiver = receiver.with_cursor_style(CursorStyle::PointingHand);
|
||||
}
|
||||
|
||||
receiver
|
||||
.on_down(MouseButton::Left, move |_, cx| {
|
||||
cx.dispatch_action(ActivateItem(ix));
|
||||
cx.propagate_event();
|
||||
|
|
Loading…
Reference in a new issue