panel: Ensure margins are relative to panel position (orientation)