show ellipsis properly if the text overflows in root directory settings

Fixed #2496

TBR: @devoncarew