Add the "doNoTrim" flag to the `Widget` class (see #4287)