Closed rafaellehmkuhl closed 3 months ago
The dynamic placement of the buttons on the map widget looks very nice!
In addition to that, what if the widgets were prevented from being dragged or resized under the top and bottom bars? Probably no user intentionally places the widgets covered by the bars.
There is a console error regarding a mouse event when dragging the map widget: Not from this commits, but is good to point out anyway.
In addition to that, what if the widgets were prevented from being dragged or resized under the top and bottom bars?
I'm finishing this functionality in a separate PR. Should be ready between today and tomorrow.
Probably no user intentionally places the widgets covered by the bars. For most situations that is true, but we have the case of full-screen widgets, like the VideoPlayer and the Map. I'm taking them into account for this.
Now the bottom bar has a dynamic size, that is exposed to everyone. This allows for components like the
SlideToConfirm
, or widgets like theMap
to use only the visible widgets area (and prevent positioning of buttons under the bar).The immediate change is that the
Map
widget now does not have its buttons "floating" in the middle of the widget, with a fixed height from the bottom edge. They can now react to the positioning of the widget itself with respect to the bottom bar, never being under it.Before:
After:
https://github.com/bluerobotics/cockpit/assets/6551040/424d6f4c-9267-4b7d-a76f-94347c73f97c