[Bug 1022450] Backport fix to keep panels auto-hidden and centered after changing display resolution