-
Notifications
You must be signed in to change notification settings - Fork 255
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
Fluid: Reposition and rescale #497
Conversation
…-widgets in widget_class automatically rescale
Sorry for the very late reply. OK, so I see what you are doing here, and I believe that we can do a much easier implementation. If you set relative position, the Widget Class is generate at 0, 0 first and later moved, so the Fl_Group::position() method does all the work. We can do the same for resizing. We just let Fl_Group::resize() do all the work for us. So these would be the code snippets for all three options: Default:
Position relative:
Position and size relative:
Please let me know if this solves your issues. |
It won't work if your embedded widgets has larger size than embedding widget.
|
Why not? The
|
@MatthiasWM On behalf of the OP, it's all there.
I just tested both The discussion continued in #481 (comment) where @etorth explained why his patch would be useful because you can't always "know" the exact size of a "class definition" if it has been developed in another project or by another team. @MatthiasWM That said, I'm not sure if it's worth the effort and I wasn't sure whether the proposed code would be correct. That's why I asked for your review. I'm +/- 0 on this change and would like to leave the decision to you. |
@etorth @Albrecht-S Ok, so I implemented the feature in PR #531 . The implementation works as expected with the give .fl file, and I am pretty sure it will work well for other cases too. It's actually a nice feature that makes widget classes more useful. |
Continuation of #481