fixes #1333 (closed) #1331 and a small bug with nested panel headers when navbar height != panel header height