Repository navigation
fix: handle zero-height content in arrow list view #759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -172,9 +172,7 @@ T.ComboBox { | |
| rightMargin: DS.Style.popup.margin | ||
| palette: control.palette | ||
| implicitWidth: control.flat ? Math.max(contentItem.implicitWidth + leftPadding + rightPadding, control.width) : control.width | ||
| // 60 is a temporary viewport so the list can realize one row and be measured. | ||
| implicitHeight: (contentItem.sizedHeight > 0 ? contentItem.sizedHeight : 2 * DS.Style.arrowListView.itemHeight) | ||
| + topPadding + bottomPadding | ||
| implicitHeight: contentItem.sizedHeight + topPadding + bottomPadding | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Medium · Empty popups have no height When the ComboBox model is empty and its popup is opened, Restore a fallback minimum-height estimate when Prompt for AI agentsIn `qt6/src/qml/ComboBox.qml` at line 175:
**Empty popups have no height**
When the ComboBox model is empty and its popup is opened, `contentItem.sizedHeight` is zero, so the `ComboBox` binding sets `implicitHeight` to the popup's default zero vertical padding and overrides the background's implicit minimum; the popup appears collapsed.
Restore a fallback minimum-height estimate when `contentItem.sizedHeight` is zero. |
||
| onClosed: control.isInteractingWithContent = false | ||
| Connections { | ||
| target: control | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Medium · Nonempty lists stay collapsed
When a delegate is realized before it has a positive measured height,
itemsView.hasDelegatemakesArrowListView.sizedHeightreturnimplicitHeightwhileitemsView.contentHeightis still zero, leaving the ListView without a positive viewport to measure height-dependent or later delegates and keeping the popup collapsed.Use the provisional viewport estimate until
itemsView.contentHeightis positive instead of treatingitemsView.hasDelegatealone as a measured height.Prompt for AI agents