Skip to content

Add safe triangle behavior for nested menus#420

Merged
genusistimelord merged 1 commit into
iced-rs:mainfrom
zao111222333:main
Apr 27, 2026
Merged

Add safe triangle behavior for nested menus#420
genusistimelord merged 1 commit into
iced-rs:mainfrom
zao111222333:main

Conversation

@zao111222333

Copy link
Copy Markdown
Contributor

I inroduced the safe triangle behavior for menu interactions. It tracks the last cursor position over a parent menu item, builds a triangular safe area toward the opened submenu, and keeps the submenu open while the cursor moves through that area. This prevents nested menus from closing prematurely when users move the cursor from a parent item into its child menu.

Demonstrated by

cargo run --release --example menu

Before:

Screen.Recording.2026-04-26.at.22.24.19.mov

Now:

Screen.Recording.2026-04-26.at.22.26.58.mov

@genusistimelord genusistimelord left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

thank you this looks good.

@genusistimelord genusistimelord merged commit 640a230 into iced-rs:main Apr 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants