Bars don't have their size set anymore. #6

Open
opened 2019-11-14 22:19:21 -05:00 by kennyrkun · 0 comments
kennyrkun commented 2019-11-14 22:19:21 -05:00 (Migrated from github.com)

Layout used to call setSize on every object added with the window size as parameters, and this is how bars got their sizes. This is obviously not great, because everything got big. I removed the setSize and setPosition calls from the add method in Layout because I thought that elements should figure it out themselves.

so now bar needs a way to set its size without adding stupid code back into the add function. I think the constructor for Bar should be able to access its parent Layout and get the size of the window from there.

Layout used to call setSize on every object added with the window size as parameters, and this is how bars got their sizes. This is obviously not great, because everything got big. I removed the setSize and setPosition calls from the `add` method in `Layout` because I thought that elements should figure it out themselves. so now bar needs a way to set its size without adding stupid code back into the add function. I think the constructor for Bar should be able to access its parent `Layout` and get the size of the window from there.
Sign in to join this conversation.
No description provided.