Calculate status bar's height when the dialog is about to be shown.