Why does overlay::Element contains a position field? #1580
luandknguyen
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I do not know much about how iced work internally. Why does
overlay::Elementcontains a position field? Shouldn't it make more sense for theOverlaytrait to have a member function returning that information instead? Something likefn position(&self), similar to thewidth()andheight()functions of theWidgettrait.When I first implemented an overlay, I thought it is similar to the
Widgettrait. So I implemented theFromtrait for my overlay to easily convert it into anoverlay::Element. Apparently this is not how you do it.Beta Was this translation helpful? Give feedback.
All reactions