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

Card overlays #183

Merged
merged 4 commits into from
Sep 11, 2023
Merged

Card overlays #183

merged 4 commits into from
Sep 11, 2023

Conversation

turai
Copy link

@turai turai commented Sep 11, 2023

Currently cards can't have overlays, which this PR implements, however a few questions remain:

  • All the children have their own wrapper layout, I'm sure there's a reason for it. This means the overlay method must be called for the first child within the wrapper (the actual child layout), otherwise only the first one will be rendered (eg. Row [ PickList (this only), PickList, PickList ]). This requires either an unwrap or some kind of logic, which is, even if it's just a line, may not be necessary. Could this be a valid reason to remove the wrappers and use the child layouts direcly?
  • is there a point to have overlays for the header or the footer? In my opinion only allowing the body to have overlays could be sensible, however I do have some use cases from the past where I had to use dropdown menus in the footer

src/native/card.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@genusistimelord genusistimelord left a comment

Choose a reason for hiding this comment

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

looks good now. just need to fix any formatting or clippy issues and I can merge it in.

Copy link
Collaborator

@genusistimelord genusistimelord left a comment

Choose a reason for hiding this comment

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

Everything looks good now! Let me know if your done with any changes and I can merge this in.

@genusistimelord genusistimelord marked this pull request as ready for review September 11, 2023 15:00
@turai
Copy link
Author

turai commented Sep 11, 2023

This is all for now, I'll see if the layout can be flattened later when I have the time.

@genusistimelord
Copy link
Collaborator

OK that can be in another PR later as its not really super important. this can be the current fix at least.

@genusistimelord genusistimelord merged commit 1e0e5da into iced-rs:main Sep 11, 2023
2 checks 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