Fix combobox initial sizing
ClosedPublic

Authored by davidedmundson on Jan 29 2019, 4:29 PM.

Details

Summary

We have a listview in a popup. The popup is resized to the listview
content height.

Because the popup starts out at size 0 the listview thinks it's too
small to show anything.

So it doesn't load any delegates.

As it has no delegates it can't guess the contentHeight.
contentHeight is a guess based on count * (currentHeight
/ currentlyLoadedDelegates)

That means the popup doesn't resize properly.

Ultimately it does end up showing a two entries, but it doesn't
re-evaluate the contentHeight properly to resize the popup correctly.

Forcing it to load one delegate is enough to break that cycle.

BUG: 403736

Test Plan

Opened popup in cursortheme and fonts
Worked correctly

Diff Detail

Repository
R858 Qt Quick Controls 2: Desktop Style
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Jan 29 2019, 4:29 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJan 29 2019, 4:29 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson requested review of this revision.Jan 29 2019, 4:29 PM
mart accepted this revision.Jan 29 2019, 4:41 PM
This revision is now accepted and ready to land.Jan 29 2019, 4:41 PM
ngraham accepted this revision.Jan 29 2019, 4:53 PM
This revision was automatically updated to reflect the committed changes.