0

I have custom subclass of gtk::Box, I need to make it calculate width based on parent(50% for example) and height using aspect ratio that needs to be specified.

I tried implementing size_allocate using WidgetImpl, but when using println! inside of it nothing happened(I tried calling object.size_allocate but it is different function probably).

1 Answer 1

0

What you need is gtk constraints

Sign up to request clarification or add additional context in comments.

2 Comments

How do I apply my constraint layout?
Ok, so I figured out that I need to set layout manager, thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.