Ensure containers have a size of at least 1px after resize

Fixes #2226.
Fixes #2776.
Fixes #3241.
Related to #3194.
This commit is contained in:
Orestis Floros
2018-09-06 04:56:31 +03:00
parent 09683d21a9
commit 23c1c13d34
3 changed files with 34 additions and 15 deletions

View File

@ -25,6 +25,13 @@ void resize_graphical_handler(Con *first, Con *second, orientation_t orientation
*/
bool resize_neighboring_cons(Con *first, Con *second, int px, int ppt);
/**
* Calculate the minimum percent needed for the given container to be at least 1
* pixel.
*
*/
double percent_for_1px(Con *con);
/**
* Calculate the given container's new percent given a change in pixels.
*