Adapt total height of panel if rail height changes