getTopPanelHeight checks for negative y position
fixed padding calculation #22