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
-
I do not know much about how iced work internally. Why does
overlay::Element
contains a position field? Shouldn't it make more sense for theOverlay
trait to have a member function returning that information instead? Something likefn position(&self)
, similar to thewidth()
andheight()
functions of theWidget
trait.When I first implemented an overlay, I thought it is similar to the
Widget
trait. So I implemented theFrom
trait 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