Control length of line in legend

The answer is here Control length of line in legend

it is TLegend::SetMargin()