Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] PaneGrid click interaction on the top edge #2168

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

jhff
Copy link
Contributor

@jhff jhff commented Dec 15, 2023

Issue

Clicking on the top edge of a PaneGrid expands the clicked pane and pushes all other panes on the top row to below.

This occurs because clicking a pane directly leads to a Dragging action, that, once button is released, will drop the pane on the top edge.

issuee

Solution

This PR adds a new action, Clicking, which will only jump to Dragging if cursor moves a given deadband distance from the original click position. I have defined this deadband distance as 10 pixels, but let me know if it is too short/wide.

Result

fixx

@jhff jhff force-pushed the fix/pane_grid_top_edge_click branch from 7856853 to 116fb66 Compare December 15, 2023 10:30
@hecrj hecrj added bug Something isn't working widget fix labels Dec 15, 2023
@hecrj hecrj added this to the 0.12 milestone Dec 15, 2023
Copy link
Member

@hecrj hecrj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful! Thanks 🙇

@hecrj hecrj merged commit 68c0484 into iced-rs:master Jan 4, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fix widget
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants