Skip to content

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

Merged
hecrj merged 1 commit intoiced-rs:masterfrom
jhff:fix/pane_grid_top_edge_click
Jan 4, 2024
Merged

[Fix] PaneGrid click interaction on the top edge#2168
hecrj merged 1 commit intoiced-rs:masterfrom
jhff:fix/pane_grid_top_edge_click

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
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

Comments