Skip to content

exposay: some layout fixes

Leandro Ribeiro requested to merge leandrohrb/weston:exposay into master

This series should improve the exposay layout. If there's anything wrong or any suggestions, please let me know :)

  • 1/8 - Move calculation of constant value int pad to outside the loop.

  • 2/8 - Make get_output_work_area() global, since it can be used by exposay to learn the free space where it can render its surfaces.

  • 3/8 - Use get_output_work_area() to not take into account the panel size, instead of considering that the whole screen is available to render exposay's surfaces.

  • 4/8 - The padding_inner with fixed size (80px) can cause crashes, besides creating a lot of unused space. This makes padding_inner to be 10% of surface_size, avoiding crashes and making it more visually pleasant.

  • 5/8 - Add margins to centralize the exposay, what makes it more visually pleasant and avoids the panel to get overlapped.

  • 6/8 - Each internal surface of exposay is a square, but most of the windows are rectangular. Add margin to centralize exposay's surfaces in their own square.

  • 7/8 - The grid is square, but sometimes we don't have enough surfaces to fill the last row. The algorithm to centralize the surfaces in the last row was not working. Add code to replace it.

  • 8/8 - The outer padding makes no sense anymore. It was used to avoid the panel to get overlapped by the exposay surfaces and to keep distance from the borders of the window (what has already been fixed in this series). Currently, it just creates unnecessary unused space. Delete outer padding from struct exposay_output.

Here's an image before and another one after the changes.

Edited by Daniel Stone

Merge request reports