feat(ui): overlay should honor widgets size hints / minimum size hints and should be transparent to user input events
Description
Overlay widgets are a great feature but can be cumbersome to give them the right size. Currently, man need to specify in the xml, the position (good!) and its size:
<layout type="sight::ui::layout::overlay">
<view x="-1" y="0" width="400" height="80" />
...
</layout>
This is annoying because we must predict the size of the underlying widgets, otherwise the widget is drawn truncated, or, if the size is too big, all user input events are captured, even if there is no widget under the mouse. This may lead the user to think the camera is broken, for example.
Functional specifications
Two things to do:
- Make the overlay container to have the correct size, by listening to its layout and to the contained widgets, like any regular Qt widgets/layout. It may be still possible to specify a minimum size / default size to address some corner case use (I don't see one at the moment..)
- Be transparent to user input events if there is "nothing" that should interact with user.
Technical specifications
Details of the implementation.
Test plan
Describe how you will verify that the implementation meets specifications.