Depending on font size and settings the ProgressBar's implicit size might be wider than our minimum size of 15 gridUnit. This causes the Popup to change size when switching from ProgressBar (e.g. changing volume) to Text (e.g. volume muted).
By setting preferredWidth to 1 we ensure we never exceed the overall minimum size when the ProgressBar is shown.
- Wide text still makes the popup grow as necessary and is still cut off at half the screen width
- Initial popup position also works (
Layoutdoes that only deferred when the window is shown, so we can't use a combination of
maximumWidthin lieu of the