Draft: applets/userswitcher: Fit dialog height to content
The Userswitcher applet's flyout list is not properly setting the height when accounts are logged out: gaps equal to the height of one or more list entries will be present, and the list does not auto-fit.
The implicitHeight definition is calculated correctly, and while the dialog is resizable like most other plasmoids, the list content does not scale/stretch: sizing up produces empty list gaps, and sizing down to fit the contents will match minimumHeight. The content scaling is correct in all cases here, it's simply that the list height is not auto-fitting to the contents.
I see two ways this could be resolved:
- On invoke, determine if user has manually adjusted widget height and if not, set height from implicitHeight.
- Not sure if this can be done in QML alone or if other plasmoids have similar issues/behavior.
- Remove resize-ability and set both the minimum and maximum list height from implicitHeight.
- There may be use-cases for the resizable list, needs feedback.
- This should also utilize the ScrollView once a large number of accounts is reached (5 or so). Fairly sure this can be accounted for.
More than open to feedback and ideas, I'm going to continue inspecting existing widgets to get more information on QML-based layouts like this.