Fix width calculation, keeping the state bits
Allow texts to be directly set without @string-resource