Skip to content

Commit

Permalink
Fix dragging tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
Adanos020 committed Apr 3, 2024
1 parent 41bec1d commit 7e8a318
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/widgets/dock_area/show/leaf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,14 @@ impl<'tree, Tab> DockArea<'tree, Tab> {
}
}

let response = tabs_ui.interact(response.rect.union(close_rect), id, sense);
let response = {
let rect = if close_rect == Rect::ZERO {
response.rect
} else {
response.rect.union(close_rect)
};
tabs_ui.interact(rect, id, sense)
};
if let Some(pos) = state.last_hover_pos {
// Use response.rect.contains instead of
// response.hovered as the dragged tab covers
Expand Down

0 comments on commit 7e8a318

Please sign in to comment.