-
Notifications
You must be signed in to change notification settings - Fork 13
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
How do I set min-sizes in pixels? #9
Comments
Hi there, I'm hoping to get some time to sit down and think the logic through, so that everything is self-consistent even when different units are mixed together. I'm gonna keep this issue open, and keep you posted when I have some updates. And of course, if you have the time/will/skills to implement it on your own, feel free to open a pull request! |
I might do it when I find time before you @alesgenova, so keep us updated. |
I think it would be better to have the top/left values as absolute pixels instead of percentages, but re-doing that is a bit much work IMO. Also, I quite like the idea to not have to recalculate the sizes if you only use percentages. But recalculation is required if one of the provided values are absolute or are not relative to the host. I've done the basic conversion, but there are some open things needed to be discussed: In order to let Additionally, we now have to calculate the sizes twice, once for an initial paint and an following one that uses the first paint to determine the dimensions of the component host. Furthermore, when the window is resized, we now also have to re-check the min/max values in order to fix the relative values again. I didn't bother the touch the Regarding the units, I think we don't have to support every single possible unit there is, I'd argue nobody would set centimeters, inches, or points for splitters, as this is more commonly used for print stylesheets. You may argue about the Here is my commit. |
I agree with the points you raised, as soon as the size of one of the areas is in absolute units it gets more complicated and expensive. I'm looking at the current code, and I see that all the slots are children on a This way we could avoid recalculating the sizes each time the window is resized. |
Hi @alesgenova
split-me works really well. Thanks for sharing.
Just a question: How would I set min-sizes in pixels? In my use case (proxy example below) I need the left sidebar to be minimum 200px wide. Is that possible and how?
The text was updated successfully, but these errors were encountered: