Skip to content

don't paint tiny tab drags#887

Merged
dzhou121 merged 3 commits intolapce:masterfrom
dholth:debounce-tab-drag
Jul 28, 2022
Merged

don't paint tiny tab drags#887
dzhou121 merged 3 commits intolapce:masterfrom
dholth:debounce-tab-drag

Conversation

@dholth
Copy link
Copy Markdown
Contributor

@dholth dholth commented Jul 28, 2022

This is my idea of how to fix #886. The drag data keeps track of the start position, and we don't paint the editor tab unless it's 5px away from the initial mouse down event. It would need to be updated to include other draggable items, mainly the file picker tab. Right now it does still paint the stationary tab highlight, which isn't as jarring as seeing the entire tab move a tiny bit when you just meant to click on it. It should be cleaned up a bit.

It now handles the file picker tabs, but the rectangle indicating the drag target still flashes sometimes on small drags.

@MinusGix MinusGix added the A-ui Area: UI rendering and interactions label Jul 28, 2022
@dzhou121 dzhou121 merged commit 1a425be into lapce:master Jul 28, 2022
@dholth dholth deleted the debounce-tab-drag branch July 28, 2022 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ui Area: UI rendering and interactions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accidental drags paint tabs

3 participants