Fix the home max width to be displayed correctly on large screen

Also fix max height calculation without top bar

Fix #671