Skip to content
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

TBLayout: one fixed item and one item take remaining space #124

Open
jeduden opened this issue Feb 21, 2018 · 1 comment
Open

TBLayout: one fixed item and one item take remaining space #124

jeduden opened this issue Feb 21, 2018 · 1 comment

Comments

@jeduden
Copy link

jeduden commented Feb 21, 2018

I am trying to figure out how to configure TBLayout to have one item with a preferred width and another item next to it taking the remaining space.
So a similar to the case of the mover, where the titlebar should take a all space except for the space the close button occupies.
https://github.com/fruxo/turbobadger/blob/master/src/tb/tb_window.cpp#L253
Unfortunately, there the layout is down manually.
I tried several settings with gravity, distribution etc. non produced the expected result.
I am probably missing something.

@fruxo
Copy link
Owner

fruxo commented Feb 21, 2018

You could use distribution gravity, as shown in the demo (see test_layout02.tb.txt)

It will respect the preferred, min and max size, so as long as the widget that should take up all space is fine with that it will work directly. If not, you could override it by giving the widget "lp: max-width: 10000dp" to force allow it to expand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants