Set linewidth not work

Is there a good way to modify the line width now?

See this example:

When I quoted Line2, I was not a constructor. I thought this feature was deprecated in the latest version. When you reminded me, I went to study this example and found that it was in another file. I was wrong. thank you for inspiring me :sweat_smile: