Improved a little the algoright that resizes the projects tree

Our aproach is not very good so it will never be much better than this
we are hitting a limitation by qt here
Merge pull request #1525 from perrito666/master

Improved a little the algoright that resizes the projects tree