Repository navigation
chore: merge master into v25-flowstyle #727
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
59f6731
78051cf
444be1b
d0de769
43f8b3b
576f425
2ac5a39
7c97a95
1cb9d79
15d3495
db82f88
6883c5a
b8ee7b1
660a12b
5b35715
c82227a
4769ee4
4d55a74
4325119
ca271bb
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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| 6.7.49 | ||
| 6.7.51 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,17 @@ FocusScope { | |
| property int itemHeight: DS.Style.arrowListView.itemHeight | ||
| property alias view: itemsView | ||
|
|
||
| // Full height of the list, to size a popup before it is mapped. | ||
| readonly property real sizedHeight: { | ||
| if (itemsView.count === 0) | ||
| return 0 | ||
| const item = itemsView.itemAtIndex(0) | ||
| const measured = itemsView.contentHeight > 0 && item ? (item.height || item.implicitHeight) : 0 | ||
| const arrowStrips = itemsView.count > maxVisibleItems | ||
| ? 2 * (DS.Style.arrowListView.stepButtonIconSize.height + contentLayout.spacing) : 0 | ||
| return Math.min(itemsView.count, maxVisibleItems) * (measured > 0 ? measured : itemHeight) + arrowStrips | ||
| } | ||
|
|
||
| implicitWidth: Math.max(DS.Style.arrowListView.width, contentLayout.implicitWidth) | ||
| implicitHeight: contentLayout.implicitHeight | ||
|
|
||
|
|
@@ -25,7 +36,7 @@ FocusScope { | |
| visible: itemsView.interactive | ||
| Layout.alignment: Qt.AlignHCenter | ||
| Layout.fillWidth: true | ||
| Layout.preferredHeight: implicitHeight | ||
|
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 · Long-list popup clips arrow buttons When a list has more items than Use the button’s actual Also at Prompt for AI agentsIn `qt6/src/qml/ArrowListView.qml` at line 28:
**Long-list popup clips arrow buttons**
When a list has more items than `maxVisibleItems` and both arrow buttons are shown, the layout and `sizedHeight` reserve 12 px per arrow, but the loaded `ActionButton` remains 16 px tall; the popup is 8 px too short when both arrows are shown, so the buttons overlap or are clipped.
Use the button’s actual `stepButtonSize.height` consistently for the layout reservation and popup-height calculation, or size the loaded button to the reserved height.
Also at `qt6/src/qml/ArrowListView.qml:26`. |
||
| Layout.preferredHeight: DS.Style.arrowListView.stepButtonIconSize.height | ||
| view: itemsView | ||
| stepSize: control.itemHeight | ||
| direction: P.ArrowListViewButton.UpButton | ||
|
|
@@ -36,6 +47,7 @@ FocusScope { | |
| clip: true | ||
| Layout.fillWidth: true | ||
| Layout.fillHeight: true | ||
| onHeightChanged: if (height > 0 && contentHeight === 0) forceLayout() | ||
| implicitHeight: itemsView.count > 0 ? Math.min(contentHeight, maxVisibleItems * contentHeight / itemsView.count) : 0 | ||
| implicitWidth:{ | ||
| var maxWidth = DS.Style.arrowListView.width | ||
|
|
@@ -81,7 +93,7 @@ FocusScope { | |
| visible: itemsView.interactive | ||
| Layout.alignment: Qt.AlignHCenter | ||
| Layout.fillWidth: true | ||
| Layout.preferredHeight: implicitHeight | ||
| Layout.preferredHeight: DS.Style.arrowListView.stepButtonIconSize.height | ||
| view: itemsView | ||
| stepSize: control.itemHeight | ||
| direction: P.ArrowListViewButton.DownButton | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -194,6 +194,9 @@ T.ComboBox { | |
| rightMargin: DS.Style.popup.margin | ||
| palette: control.palette | ||
| implicitWidth: control.flat ? Math.max(contentItem.implicitWidth, 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 | ||
|
Comment on lines
+198
to
+199
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 models show blank popups When the ComboBox model is empty and its popup is opened, including while the model is loading, Return zero popup content height for an empty model rather than applying the two-row fallback. Prompt for AI agentsIn `qt6/src/qml/ComboBox.qml` at lines 198-199:
**Empty models show blank popups**
When the ComboBox model is empty and its popup is opened, including while the model is loading, `contentItem.sizedHeight` is zero, so the two-row fallback gives the popup a nonzero height and it displays a blank panel.
Return zero popup content height for an empty model rather than applying the two-row fallback. |
||
| 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 · Variable-height rows mis-size popups
When a ComboBox uses delegates with different heights, or index 0 is not realized while custom-height delegates are in use,
sizedHeightuses one realized row's height for every visible row and falls back toitemHeightwhen index 0 is not realized, so the popup height is inaccurate and clips rows or leaves excess space.Calculate the total height of the visible rows, or otherwise account for each delegate's height and unrealized rows.
Also at
qt6/src/qml/ArrowListView.qml:26-27.Prompt for AI agents