Bug 403736 - Some comboboxes don't show all items
Summary: Some comboboxes don't show all items
Status: RESOLVED FIXED
Alias: None
Product: frameworks-qqc2-desktop-style
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-29 15:31 UTC by Nate Graham
Modified: 2019-01-30 02:37 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.55


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2019-01-29 15:31:48 UTC
There are a few comboboxes in System Settings KCMs that don't show all items in the pop-up when clicked on. Hoerver if you mouse wheel over the button, it will still cycle through all items.

This bug affects the Fonts KCM's "Sub-Pixel Rendering" and "Hinting" comboboxes, and the "Window Border Size" combobox in the ported Window Decorations KCM from https://phabricator.kde.org/D18458.
Comment 1 David Edmundson 2019-01-30 01:56:07 UTC
Git commit 152bb7363a803a8099367cc7f423b9b8180f0ba4 by David Edmundson.
Committed on 30/01/2019 at 01:55.
Pushed by davidedmundson into branch 'master'.

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.

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

M  +5    -0    org.kde.desktop/ComboBox.qml

https://commits.kde.org/qqc2-desktop-style/152bb7363a803a8099367cc7f423b9b8180f0ba4