Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
59f6731
fix: install DLL to bin directory on Windows
kt286 Aug 20, 2026
78051cf
i18n: [dtkdeclarative] Updates for project Deepin Tool Kit (#669)
transifex-integration[bot] Aug 26, 2026
444be1b
fix(slider): align tick labels within slider bounds
mhduiy Aug 27, 2026
d0de769
fix(arrowlistview): fix ArrowListView height oscillation and item cli…
mhduiy Aug 31, 2026
43f8b3b
fix(slider): add NoArrowType case in SliderHandle
52cyb Aug 18, 2026
576f425
fix: compare winId consistently in _q_onWindowMotifHintsChanged
svan71 Jul 11, 2026
2ac5a39
fix(dciicon): restore smooth filtering for mixed-DPI scaling
gugullll Sep 7, 2026
7c97a95
fix(dciicon): restore smooth filtering for mixed-DPI scaling
gugullll Sep 4, 2026
1cb9d79
chore: New release 6.7.49
github-actions[bot] Sep 10, 2026
15d3495
i18n: Translate dtkdeclarative.ts in sv (#674)
transifex-integration[bot] Sep 11, 2026
db82f88
fix(popup): set fixed default implicit size for Window popupType
Ivy233 Aug 25, 2026
6883c5a
fix(popup): restore implicit size bindings on Popup for qt6
Ivy233 Sep 18, 2026
b8ee7b1
fix: correct model reference in ArrowListView
wjyrich Sep 20, 2026
660a12b
feat: add split screen menu to title bar
18202781743 Sep 11, 2026
5b35715
fix: use formal parameter in ThemeMenu signal handler
52cyb Sep 8, 2026
c82227a
chore: New release 6.7.50 (#709)
deepin-bot[bot] Sep 22, 2026
4769ee4
fix(ComboBox): size popup before it is mapped
mhduiy Sep 28, 2026
4d55a74
i18n: Translate dtkdeclarative.ts in mn (#720)
transifex-integration[bot] Oct 15, 2026
4325119
chore: New release 6.7.51
github-actions[bot] Oct 15, 2026
3d00a9d
feat: add window blur control to DialogWindow
wjyrich Sep 29, 2026
ccb129a
fix: prevent palette feedback binding loops
18202781743 Oct 20, 2026
d02f5c9
chore: New release 6.7.52
github-actions[bot] Oct 28, 2026
0159003
fix: delete backdrop renderer on invalidated
caixr23 Oct 29, 2026
4ce893f
fix: Preserve Qt6 text field cursor with TapHandler
gugullll Nov 2, 2026
485c154
fix: cancel pending URL loads when setting base64 icon
wjyrich Oct 30, 2026
01d2735
fix: adjust dialog layout sizing to prevent stretch issues
wjyrich Nov 4, 2026
81faff2
fix: silence -Wunused-result in color selector unit test
52cyb Oct 27, 2026
73eb9e5
chore: New release 6.7.53
github-actions[bot] Nov 10, 2026
0b5f757
fix: prevent Qt6 menu from closing on Alt
18202781743 Nov 11, 2026
964437c
chore: New release 6.7.54
github-actions[bot] Nov 18, 2026
e233481
fix(qml): correct dropdown sizing
mhduiy Oct 15, 2026
ebee043
chore: merge master into v25-flowstyle
18202781743 Nov 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,35 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [6.7.54] - 2026-11-18

### Fixed

- Prevent Qt6 menu from closing on Alt

## [6.7.53] - 2026-11-10

### Fixed

- Preserve Qt6 text field cursor with TapHandler
- Cancel pending URL loads when setting base64 icon
- Adjust dialog layout sizing to prevent stretch issues
- Silence -Wunused-result in color selector unit test

### Removed

- Delete backdrop renderer on invalidated

## [6.7.52] - 2026-10-28

### Added

- Add window blur control to DialogWindow

### Fixed

- Prevent palette feedback binding loops

## [6.7.51] - 2026-10-15

### Changed
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.7.51
6.7.54
2 changes: 1 addition & 1 deletion archlinux/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Maintainer: zccrs <zhangjide@deepin.org>
pkgname=dtkdeclarative-git
pkgver=6.7.51
pkgver=6.7.54
pkgrel=1
sourcename=dtkdeclarative
sourcetars=("$sourcename"_"$pkgver".tar.xz)
Expand Down
18 changes: 18 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
dtkdeclarative (6.7.54) unstable; urgency=medium

* Release 6.7.54

-- yeshanshan <yeshanshan@uniontech.com> Wed, 18 Nov 2026 16:43:56 +0800

dtkdeclarative (6.7.53) unstable; urgency=medium

* Release 6.7.53

-- yeshanshan <yeshanshan@uniontech.com> Tue, 10 Nov 2026 20:32:44 +0800

dtkdeclarative (6.7.52) unstable; urgency=medium

* Release 6.7.52

-- yeshanshan <yeshanshan@uniontech.com> Wed, 28 Oct 2026 16:31:26 +0800

dtkdeclarative (6.7.51) unstable; urgency=medium

* Release 6.7.51
Expand Down
65 changes: 43 additions & 22 deletions qt6/src/qml/ArrowListView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Copy link
Copy Markdown

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, _measuredRowHeight records only the first realized row, and implicitHeight uses that value to cap the viewport at maxVisibleItems rows. 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
In `qt6/src/qml/ArrowListView.qml` at line 20:

**Dropdown shows the wrong number of rows**

When a dropdown uses delegates with different heights, `_measuredRowHeight` records only the first realized row, and `implicitHeight` uses that value to cap the viewport at `maxVisibleItems` rows. 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`.


// 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
Expand All @@ -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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The 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 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.

Prompt for AI agents
In `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.
Expand All @@ -81,16 +84,34 @@ FocusScope {
highlightMoveDuration: -1
highlightMoveVelocity: 400

onCountChanged: refreshContentItemWidth()
Connections {
target: itemsView.contentItem
function onChildrenChanged() { Qt.callLater(itemsView.refreshContentItemWidth) }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The 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 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.

Prompt for AI agents
In `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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The 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 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.

Prompt for AI agents
In `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()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The 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 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.

Prompt for AI agents
In `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
}
}

Expand Down
3 changes: 1 addition & 2 deletions qt6/src/qml/ComboBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ T.ComboBox {
bottomPadding: control.flat ? 0 : padding

delegate: MenuItem {
implicitWidth: Math.max(DS.Style.control.implicitWidth(control), popup.implicitWidth - DS.Style.popup.margin * 2)
useIndicatorPadding: true
text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : (model[control.textRole] === undefined ? modelData[control.textRole] : model[control.textRole])) : modelData
icon.name: (control.iconNameRole && model[control.iconNameRole] !== undefined) ? model[control.iconNameRole] : null
Expand Down Expand Up @@ -203,7 +202,7 @@ T.ComboBox {
leftMargin: DS.Style.popup.margin
rightMargin: DS.Style.popup.margin
palette: control.palette
implicitWidth: control.flat ? Math.max(contentItem.implicitWidth, control.width) : control.width
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
Expand Down
36 changes: 23 additions & 13 deletions qt6/src/qml/DialogWindow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand All @@ -67,6 +75,7 @@ Window {

Loader {
active: title !== ""
visible: active
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
sourceComponent: Component {
Expand All @@ -82,6 +91,7 @@ Window {
Item {
id: contentLoader
Layout.fillWidth: true
Layout.fillHeight: true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium · 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.

Prompt for AI agents
In `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
Expand Down
9 changes: 9 additions & 0 deletions qt6/src/qml/Menu.qml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,17 @@ T.Menu {

contentItem: FocusScope {
// QTBUG-99897 focus doesn't be clear.
// Handle keys even before a menu item is selected.
focus: true
implicitWidth: viewLayout.implicitWidth
implicitHeight: viewLayout.implicitHeight

// Match QWidget menus with SH_MenuBar_AltKeyNavigation disabled.
Keys.onPressed: function(event) {
if (event.key === Qt.Key_Alt)
event.accepted = true
}

ColumnLayout {
id: viewLayout
spacing: 0
Expand Down
13 changes: 6 additions & 7 deletions qt6/src/qml/TextField.qml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2020 - 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2020 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: LGPL-3.0-or-later

Expand Down Expand Up @@ -58,16 +58,15 @@ T.TextField {
implicitHeight: DS.Style.edit.textFieldHeight
}

MouseArea {
anchors.fill: parent
TapHandler {
acceptedButtons: Qt.RightButton

onClicked: function (mouse) {
var point = Qt.point(mouse.x, mouse.y)
if (Window.window && Window.window.width > Screen.desktopAvailableWidth) {
onTapped: function (eventPoint) {
var point = Qt.point(eventPoint.position.x, eventPoint.position.y)
if (control.Window.window && control.Window.window.width > Screen.desktopAvailableWidth) {
point.x = control.mapFromGlobal(Screen.desktopAvailableWidth - contextMenu.width).x
}
if (Window.window && Window.window.height > Screen.desktopAvailableHeight) {
if (control.Window.window && control.Window.window.height > Screen.desktopAvailableHeight) {
point.y = control.mapFromGlobal(0, Screen.desktopAvailableHeight - contextMenu.height).y
}
contextMenu.popup(point.x, point.y)
Expand Down
Loading
Loading