Adjust height if the ToolBar or StatusBar is dynamically hidden

Triggered by a manual test I'm working on

Change-Id: I8d49a7d19ac7daebda388df8e2d8595607fdd52c
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>