-
-
Notifications
You must be signed in to change notification settings - Fork 335
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
Layout Rewrite #556
base: develop
Are you sure you want to change the base?
Layout Rewrite #556
Conversation
Squashed commits: [18e0d3a] asdf [423f618] more work [e9151c4] Initial new TableLayout [44e390a] label 2 [bcbb3d8] label [646af20] woodle [89b6f9a] Custom layout changes
I know Gtk doesn't like to be told specific sizes and also trying so set specific pixel sizes will probably break with Gtk when the user switches theme, since each element has it's size info stored with the theme. You might want to consider using Gtk layout way as a base, it might be a lot easier. |
@cra0zy, the idea is to ask the platform which size each control should be, so it should still adjust based on the theme. Each control should be able to return its 'desired size', which will be platform specific. I'll look at the Gtk layout as a base, which could probably hook into this mechanism. |
If the user changes theme while the app is running, the starting 'desired size' will be wrong. Not sure if gtk has a theme changed event, but if it does, you will need to reset sizes when it occurs. |
This should fix #462 when implemented |
This PR is the initial layout re-write to move layout logic into Eto.Forms instead of relying on each platform control to provide this functionality (which each have hacks to make them behave similarly).
Ideally we can get rid of the hacks, and just make sure each control supports a Measure() and Layout() pass, where the Measure() would determine its preferred size based on the container, and Layout() would position its child controls. This would greatly simplify the layout logic, make it easier to add other platforms, and also make it much easier to add additional layout options, such as a FlowLayout (which is included in this PR), etc.