Repository navigation
chore: merge master into v25-flowstyle #760
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
3d00a9d
ccb129a
d02f5c9
0159003
4ce893f
485c154
01d2735
81faff2
73eb9e5
0b5f757
964437c
e233481
ebee043
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.51 | ||
| 6.7.54 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,22 +15,32 @@ FocusScope { | |
| property int itemHeight: DS.Style.arrowListView.itemHeight | ||
| property alias view: itemsView | ||
|
|
||
| // Fixed per show: rows realized while scrolling can differ in height. | ||
| property real _measuredRowHeight: 0 | ||
| readonly property real _rowHeight: _measuredRowHeight > 0 ? _measuredRowHeight : itemHeight | ||
|
|
||
| // 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 showArrows = itemsView.count > maxVisibleItems | ||
| const topMargin = contentLayout.anchors.topMargin | ||
| const extraHeight = topMargin + (showArrows | ||
| ? 2 * (DS.Style.arrowListView.stepButtonSize.height + contentLayout.spacing) : 0) | ||
| return Math.min(itemsView.count, maxVisibleItems) * (measured > 0 ? measured : itemHeight) + extraHeight | ||
| if (itemsView.contentHeight > 0) | ||
| return implicitHeight | ||
| const arrowStrips = itemsView.count > maxVisibleItems | ||
| ? 2 * (DS.Style.arrowListView.stepButtonSize.height + contentLayout.spacing) : 0 | ||
| return Math.min(itemsView.count, maxVisibleItems) * _rowHeight + arrowStrips + contentLayout.anchors.topMargin | ||
| } | ||
|
|
||
| implicitWidth: Math.max(DS.Style.arrowListView.width, contentLayout.implicitWidth) | ||
| implicitHeight: contentLayout.implicitHeight + contentLayout.anchors.topMargin | ||
|
|
||
| onVisibleChanged: { | ||
| if (!visible) | ||
| return | ||
| itemsView.itemMaxWidth = 0 | ||
| _measuredRowHeight = 0 | ||
| itemsView.refreshContentItemWidth() | ||
| } | ||
|
|
||
| ColumnLayout { | ||
| id: contentLayout | ||
| anchors.fill: parent | ||
|
|
@@ -49,21 +59,14 @@ FocusScope { | |
|
|
||
| ListView { | ||
| id: itemsView | ||
| property real itemMaxWidth: 0 | ||
| 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 | ||
| for (var i = 0; i < itemsView.count; ++i) { | ||
| var item = itemsView.itemAtIndex(i) | ||
| if (item && item.implicitWidth > maxWidth) | ||
| maxWidth = item.implicitWidth | ||
| } | ||
| return maxWidth | ||
| } | ||
| interactive: itemsView.count > maxVisibleItems | ||
| implicitHeight: itemsView.count > 0 ? Math.min(contentHeight, maxVisibleItems * control._rowHeight) : 0 | ||
|
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 · Arrow scrolling cuts through rows When a dropdown's realized row height differs from the style Use the measured row height for the arrow-button step size, or otherwise ensure each arrow action advances by a whole displayed row. Prompt for AI agentsIn `qt6/src/qml/ArrowListView.qml` at line 67:
**Arrow scrolling cuts through rows**
When a dropdown's realized row height differs from the style `itemHeight`, `_rowHeight` lets the viewport use a measured row height, but the arrow buttons still scroll by `control.itemHeight`. When delegate rows are taller or shorter than that style value, each button click moves by the wrong amount and can leave the list positioned partway through an option.
Use the measured row height for the arrow-button step size, or otherwise ensure each arrow action advances by a whole displayed row. |
||
| implicitWidth: itemMaxWidth | ||
| interactive: itemsView.contentHeight > itemsView.height | ||
| ScrollIndicator.vertical: ScrollIndicator { } | ||
| highlight: HighlightPanel { | ||
| visible: false // TODO listview's highlight is confict with Item's highlight. | ||
|
|
@@ -81,16 +84,34 @@ FocusScope { | |
| highlightMoveDuration: -1 | ||
| highlightMoveVelocity: 400 | ||
|
|
||
| onCountChanged: refreshContentItemWidth() | ||
| Connections { | ||
| target: itemsView.contentItem | ||
| function onChildrenChanged() { Qt.callLater(itemsView.refreshContentItemWidth) } | ||
|
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 · Large models stall while scrolling When a very large model causes delegate creation or removal during scrolling, each Recompute width from realized delegates only, or otherwise avoid a full Prompt for AI agentsIn `qt6/src/qml/ArrowListView.qml` at line 89:
**Large models stall while scrolling**
When a very large model causes delegate creation or removal during scrolling, each `contentItem.childrenChanged` event schedules `refreshContentItemWidth()`, which scans every model index even though most rows in a virtualized list are not instantiated. Scrolling through a very large model therefore repeats a full-model scan as delegates are created or removed, causing visible UI stalls.
Recompute width from realized delegates only, or otherwise avoid a full `count` scan for each children change. |
||
| } | ||
|
|
||
| onCountChanged: { | ||
| itemMaxWidth = 0 | ||
| control._measuredRowHeight = 0 | ||
|
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 · Popup retains stale item dimensions When an existing model row changes size-affecting data without changing the item count while the popup is open, the width and row-height measurements are not refreshed for the changed row, and Invalidate and recompute the width and row-height measurements when existing row data changes. Also at Prompt for AI agentsIn `qt6/src/qml/ArrowListView.qml` at line 94:
**Popup retains stale item dimensions**
When an existing model row changes size-affecting data without changing the item count while the popup is open, the width and row-height measurements are not refreshed for the changed row, and `refreshContentItemWidth()` can also seed its scan with the previous maximum. The popup therefore stays too narrow or wide, or uses a stale row height and sizes the list incorrectly.
Invalidate and recompute the width and row-height measurements when existing row data changes.
Also at `qt6/src/qml/ArrowListView.qml:20`, `qt6/src/qml/ArrowListView.qml:103`, `qt6/src/qml/ArrowListView.qml:114-115`. |
||
| refreshContentItemWidth() | ||
| } | ||
|
|
||
| onContentHeightChanged: if (control._measuredRowHeight <= 0) refreshContentItemWidth() | ||
|
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 · Font changes leave popup height stale When the font or style changes while a menu or dropdown is open, a font or style change alters delegate heights while the popup is open, but Invalidate and recompute the row-height measurement when delegate geometry changes, including font and style updates. Prompt for AI agentsIn `qt6/src/qml/ArrowListView.qml` at line 98:
**Font changes leave popup height stale**
When the font or style changes while a menu or dropdown is open, a font or style change alters delegate heights while the popup is open, but `onContentHeightChanged` skips `refreshContentItemWidth()` once `_measuredRowHeight` is set. The viewport continues sizing from the old measurement, so rows are clipped or the popup has excess space until it is hidden and shown again.
Invalidate and recompute the row-height measurement when delegate geometry changes, including font and style updates. |
||
|
|
||
| onWidthChanged: refreshContentItemWidth() | ||
|
|
||
| function refreshContentItemWidth() { | ||
| var maxWidth = itemMaxWidth | ||
| for (var i = 0; i < itemsView.count; ++i) { | ||
| var item = itemsView.itemAtIndex(i) | ||
| if (item) { | ||
| item.width = itemsView.width | ||
| } | ||
| if (!item || !item.visible) | ||
| continue | ||
| item.width = itemsView.width | ||
| if (control._measuredRowHeight <= 0 && item.height > 0) | ||
| control._measuredRowHeight = item.height | ||
| if (item.implicitWidth > maxWidth) | ||
| maxWidth = item.implicitWidth | ||
| } | ||
| itemMaxWidth = maxWidth | ||
| } | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,9 +21,10 @@ Window { | |
| D.DWindow.wmWindowTypes: D.WindowManagerHelper.DialogType | ||
| flags: Qt.Dialog | Qt.WindowCloseButtonHint | Qt.MSWindowsFixedSizeDialogHint | ||
| D.ColorSelector.family: D.Palette.CrystalColor | ||
| color: "transparent" | ||
| height: content.height | ||
| width: content.width | ||
| property bool enableBehindWindowBlur: true | ||
| color: enableBehindWindowBlur ? "transparent" : palette.base | ||
| height: content.implicitHeight | ||
| width: content.implicitWidth | ||
|
|
||
| property alias header: titleBar.sourceComponent | ||
| property string icon | ||
|
|
@@ -33,27 +34,34 @@ Window { | |
| property real rightPadding: DS.Style.dialogWindow.contentHMargin | ||
| property real topPadding: title === "" ? 0 : DS.Style.dialogWindow.contentVMargin | ||
|
|
||
| D.StyledBehindWindowBlur { | ||
| control: control | ||
| Loader { | ||
| anchors.fill: parent | ||
| blendColor: { | ||
| if (valid) { | ||
| active: control.enableBehindWindowBlur | ||
| sourceComponent: D.StyledBehindWindowBlur { | ||
| control: Window.window | ||
| anchors.fill: parent | ||
| blendColor: { | ||
| if (valid) { | ||
| return DS.Style.control.selectColor(undefined, | ||
| Qt.rgba(235 / 255.0, 235 / 255.0, 235 / 255.0, 0.6), | ||
| Qt.rgba(10 / 255.0, 10 / 255.0, 10 / 255.0, 85 / 255.0)) | ||
| } | ||
| return DS.Style.control.selectColor(undefined, | ||
| Qt.rgba(235 / 255.0, 235 / 255.0, 235 / 255.0, 0.6), | ||
| Qt.rgba(10 / 255.0, 10 / 255.0, 10 / 255.0, 85 / 255.0)) | ||
| DS.Style.behindWindowBlur.lightNoBlurColor, | ||
| DS.Style.behindWindowBlur.darkNoBlurColor) | ||
| } | ||
| return DS.Style.control.selectColor(undefined, | ||
| DS.Style.behindWindowBlur.lightNoBlurColor, | ||
| DS.Style.behindWindowBlur.darkNoBlurColor) | ||
| } | ||
| } | ||
|
|
||
| Item { | ||
| id: content | ||
| anchors.fill: parent | ||
| implicitWidth: layout.implicitWidth | ||
| implicitHeight: layout.implicitHeight | ||
| palette: control.active ? D.DTK.palette : D.DTK.inactivePalette | ||
| implicitHeight: childrenRect.height | ||
| ColumnLayout { | ||
| id: layout | ||
| anchors.fill: parent | ||
| spacing: 0 | ||
|
|
||
| Loader { | ||
|
|
@@ -67,6 +75,7 @@ Window { | |
|
|
||
| Loader { | ||
| active: title !== "" | ||
| visible: active | ||
| Layout.fillWidth: true | ||
| Layout.alignment: Qt.AlignHCenter | ||
| sourceComponent: Component { | ||
|
|
@@ -82,6 +91,7 @@ Window { | |
| Item { | ||
| id: contentLoader | ||
| Layout.fillWidth: true | ||
| Layout.fillHeight: true | ||
|
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 · Dialog height feeds back into sizing When the content fills Remove Also at Prompt for AI agentsIn `qt6/src/qml/DialogWindow.qml` at line 94:
**Dialog height feeds back into sizing**
When the content fills `contentLoader` and the dialog is sized from its implicit size, `contentLoader.Layout.fillHeight` lets the layout assign a height that `childrenRect.height` then feeds back into the loader’s preferred height and the window’s implicit height. The dialog stretches or gets an incorrect initial size instead of settling to its content.
Remove `Layout.fillHeight` from `contentLoader` so its preferred height is determined by its content.
Also at `qt6/src/qml/settings/SettingsDialog.qml:34`. |
||
| Layout.preferredHeight: childrenRect.height | ||
| Layout.leftMargin: control.leftPadding | ||
| Layout.rightMargin: control.rightPadding | ||
|
|
||
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 · Dropdown shows the wrong number of rows
When a dropdown uses delegates with different heights,
_measuredRowHeightrecords only the first realized row, andimplicitHeightuses that value to cap the viewport atmaxVisibleItemsrows. When later rows are taller, fewer options fit or a row is clipped; when they are shorter, more options fit than configured.Calculate the viewport cap using the heights of the rows that need to fit rather than multiplying the first realized row’s height by
maxVisibleItems.Also at
qt6/src/qml/ArrowListView.qml:67,qt6/src/qml/ArrowListView.qml:110.Prompt for AI agents