The notification dialog height is based on the implicit height of
mainLayout. Main layout would shift depending on whether we were showing
the icon on the left.
When we hide a dialog we set the root item to invisible, this changes
the effective visibility of these images, which in turn changes the
width of the main layout and therefore the implicit height.
This patch changes comparing visibility of the icon to comparing if it's
null which is persistent.