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

Group Overlay #1655

Merged
merged 6 commits into from
Jan 24, 2023
Merged

Group Overlay #1655

merged 6 commits into from
Jan 24, 2023

Conversation

tarkah
Copy link
Member

@tarkah tarkah commented Jan 18, 2023

This adds a new Group overlay that allows for grouping multiple overlays returned by container widgets such as row, column & pane grid.

A new Overlay::is_over method needs to be added so we can properly validate whether the children of the Group are hovered, and not the group itself.

I've added a new example toast that shows what a toast notification system might look like in iced. This is really cool because it leverages widget animations to request redraw when toasts are set to expire and need to be removed.

As you can see below, both the toast overlay and the picklist overlay are able to show up at the same time!

simplescreenrecorder-2023-01-17_17.11.51.mp4

Fixes #1591.

This is needed for "container" overlay's such as `Group` which should
only consider it's childrens layouts and not it's own when determining
if the cursor is captured by the overlay.
@hecrj hecrj added the feature New feature or request label Jan 23, 2023
@hecrj hecrj added this to the 0.8.0 milestone Jan 23, 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.

Looks awesome! Thanks 🥳

@hecrj hecrj enabled auto-merge January 24, 2023 01:01
@hecrj hecrj merged commit 2dea5fe into iced-rs:master Jan 24, 2023
@tarkah tarkah deleted the feat/group-overlay branch January 24, 2023 01:30
@tarkah tarkah mentioned this pull request Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request rendering widget
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Only first overlay element is being rendered
2 participants