Fix combobox initial sizing

Authored by davidedmundson on Jan 30 2019, 1:55 AM.

Description

Fix combobox initial sizing

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

Reviewers: Plasma, mart, ngraham

Reviewed By: Plasma, mart, ngraham

Subscribers: plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D18597

Details

Committed
davidedmundsonJan 30 2019, 1:55 AM
Reviewer
Plasma
Differential Revision
D18597: Fix combobox initial sizing
Parents
R858:0ac99af6e691: Set combobox popups to be modal
Branches
Unknown
Tags
Unknown