Package: release.debian.org Severity: normal X-Debbugs-Cc: kf6-kirig...@packages.debian.org, Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org> Control: affects -1 + src:kf6-kirigami User: release.debian....@packages.debian.org Usertags: unblock
Dear Release Team, please unblock package kf6-kirigami. [ Reason ] It contains the following changes: * Backport upstream commits: - Fix activation of links in inline messages. (kde#500578) - Fix smooth scrolling not behaving correctly for some movement sizes. (kde#484309) - Fix password and search fields not handling RTL languages properly. (kde#504091, kde#503012) - Fix for screen readers to no longer rather pointlessly announce “LAYERED PANE ZERO ITEMS” all the time in Kirigami-based apps and System Settings pages. [ Tests ] Upstream testsuite passes in sbuild. Tested with the kirigami-gallery test app and no regression spotted. No regression either on daily driven kirigami apps like elisa, filelight, kde-connect, kinfocenter, kscreen, several parts of Plasma. [ Risks ] Only backport of upstream commits that apply cleanly. Further fixes can easily be backported or the changes reverted. [ Checklist ] [x] all changes are documented in the d/changelog [x] I reviewed all changes and I approve them [x] attach debdiff against the package in testing Thanks! unblock kf6-kirigami/6.13.0-2
diff -Nru kf6-kirigami-6.13.0/debian/changelog kf6-kirigami-6.13.0/debian/changelog --- kf6-kirigami-6.13.0/debian/changelog 2025-04-12 19:34:19.000000000 +0200 +++ kf6-kirigami-6.13.0/debian/changelog 2025-05-20 08:38:42.000000000 +0200 @@ -1,3 +1,18 @@ +kf6-kirigami (6.13.0-2) unstable; urgency=medium + + [ Aurélien COUDERC ] + * Backport upstream commits: + - Fix activation of links in inline messages. (kde#500578) + - Fix smooth scrolling not behaving correctly for some movement sizes. + (kde#484309) + - Fix password and search fields not handling RTL languages properly. + (kde#504091, kde#503012) + - Fix for screen readers to no longer rather pointlessly announce “LAYERED + PANE ZERO ITEMS” all the time in Kirigami-based apps and System Settings + pages. + + -- Aurélien COUDERC <couc...@debian.org> Tue, 20 May 2025 08:38:42 +0200 + kf6-kirigami (6.13.0-1) unstable; urgency=medium [ Patrick Franz ] diff -Nru kf6-kirigami-6.13.0/debian/patches/series kf6-kirigami-6.13.0/debian/patches/series --- kf6-kirigami-6.13.0/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ kf6-kirigami-6.13.0/debian/patches/series 2025-05-20 08:38:42.000000000 +0200 @@ -0,0 +1,10 @@ +upstream_e3c6af3b_layouts-Always-relayout-on-geometry-changes-in-ToolBarLayout.patch +upstream_81352c22_layout-Set-implicit-width-of-ToolBarLayout-before-using-its-width.patch +upstream_82abc769_controls-Fix-link-activation-for-text-of-InlineMessage.patch +upstream_2c6cd90f_controls-Improve-calculation-of-InlineMessage-implicit-height.patch +upstream_bae0957d_controls-Remove-redundant-states-from-InlineMessage.patch +upstream_fb21ee82_WheelHandler-smooth-scroll-for-a-greater-variety-of-movement-sizes.patch +upstream_bf7ead57_tst-scrolling-qml-don-t-set-default-angle-delta-to-verticalStepSize-don-t-test-if-smooth-scrolling-is-enabled-when-testing-angle-delta-moves.patch +upstream_5bf798c3_Fix-ActionTextField-RTL.patch +upstream_d803ca35_SearchField-fix-RTL-search-icon-positioning.patch +upstream_481ee938_controls-PageRow-don-t-announce-StackView-over-screen-readers.patch diff -Nru kf6-kirigami-6.13.0/debian/patches/upstream_2c6cd90f_controls-Improve-calculation-of-InlineMessage-implicit-height.patch kf6-kirigami-6.13.0/debian/patches/upstream_2c6cd90f_controls-Improve-calculation-of-InlineMessage-implicit-height.patch --- kf6-kirigami-6.13.0/debian/patches/upstream_2c6cd90f_controls-Improve-calculation-of-InlineMessage-implicit-height.patch 1970-01-01 01:00:00.000000000 +0100 +++ kf6-kirigami-6.13.0/debian/patches/upstream_2c6cd90f_controls-Improve-calculation-of-InlineMessage-implicit-height.patch 2025-05-16 18:14:21.000000000 +0200 @@ -0,0 +1,47 @@ +From 2c6cd90f785c40d6a3f72dcd824c6199634ba737 Mon Sep 17 00:00:00 2001 +From: Arjen Hiemstra <ahiems...@heimr.nl> +Date: Tue, 8 Apr 2025 11:10:47 +0200 +Subject: [PATCH] controls: Improve calculation of InlineMessage implicit + height + +If the text isn't long enough to wrap into mulitple lines, but we have +many or large actions such that the actions are still put below the +text, the actions and close button would overlap because the close +button is not accounted for. To fix that, always anchor the actions at +the bottom and calculate a more proper implicit height for the entire +inline message that accounts for close button height if it is visible. +--- + src/controls/templates/InlineMessage.qml | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/controls/templates/InlineMessage.qml b/src/controls/templates/InlineMessage.qml +index ecf3b6655..f8a868891 100644 +--- a/src/controls/templates/InlineMessage.qml ++++ b/src/controls/templates/InlineMessage.qml +@@ -207,10 +207,11 @@ T.Control { + } + + implicitHeight: { ++ let maximumTopHeight = Math.max(label.implicitHeight, icon.implicitHeight, (root.showCloseButton ? closeButton.implicitHeight : 0)) + if (atBottom) { +- return label.implicitHeight + actionsLayout.implicitHeight + actionsLayout.anchors.topMargin ++ return maximumTopHeight + actionsLayout.implicitHeight + Kirigami.Units.smallSpacing + } else { +- return Math.max(icon.implicitHeight, label.implicitHeight, closeButton.implicitHeight, actionsLayout.implicitHeight) ++ return Math.max(maximumTopHeight, actionsLayout.implicitHeight) + } + } + +@@ -354,8 +355,7 @@ T.Control { + alignment: Qt.AlignRight + + anchors { +- top: contentLayout.atBottom ? label.bottom : parent.top +- topMargin: contentLayout.atBottom ? Kirigami.Units.largeSpacing : 0 ++ bottom: parent.bottom + right: (!contentLayout.atBottom && root.showCloseButton) ? closeButton.left : parent.right + rightMargin: !contentLayout.atBottom && root.showCloseButton ? Kirigami.Units.smallSpacing : 0 + } +-- +GitLab + diff -Nru kf6-kirigami-6.13.0/debian/patches/upstream_481ee938_controls-PageRow-don-t-announce-StackView-over-screen-readers.patch kf6-kirigami-6.13.0/debian/patches/upstream_481ee938_controls-PageRow-don-t-announce-StackView-over-screen-readers.patch --- kf6-kirigami-6.13.0/debian/patches/upstream_481ee938_controls-PageRow-don-t-announce-StackView-over-screen-readers.patch 1970-01-01 01:00:00.000000000 +0100 +++ kf6-kirigami-6.13.0/debian/patches/upstream_481ee938_controls-PageRow-don-t-announce-StackView-over-screen-readers.patch 2025-05-20 08:38:42.000000000 +0200 @@ -0,0 +1,39 @@ +From 481ee938211faeb4cd166134bc270491dd36420b Mon Sep 17 00:00:00 2001 +From: Christoph Wolk <cwo....@posteo.net> +Date: Mon, 19 May 2025 08:05:07 +0200 +Subject: [PATCH] controls/PageRow: don't announce StackView over screen + readers + +PageRow has an internal StackView; it defaults to the Accessible.role +LayeredPane, which is by default announced by screen readers (or at +least by orca). This may be correct in some circumstances, but not here: +it's a purely internal object that has no user relevance; hearing +LAYERED PANE ZERO ITEMS every time a page in a PageRow is entered is +confusing to screen reader users, they have typically no idea what it +means, and if they do there is little they can do with this +information. (I guess it indicates whether a modal layer is open, but in +practice I couldn't seem to actually get this to work, and it seems +better to indicate when a modal layer is open, not every single time +when there isn't one - and that is a separate issue.) + +Instead we can set its role explicitly to Pane, that marks it as a +filler in Accerciser and orca does not read it out every time. +--- + src/controls/PageRow.qml | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/controls/PageRow.qml b/src/controls/PageRow.qml +index 99e8883c68..9fba38fbe8 100644 +--- a/src/controls/PageRow.qml ++++ b/src/controls/PageRow.qml +@@ -698,6 +698,7 @@ QT.Control { + QQC2.StackView { + id: layersStack + z: 99 ++ Accessible.role: Accessible.Pane + anchors { + left: parent.left + top: layerToolbarStack.bottom +-- +GitLab + diff -Nru kf6-kirigami-6.13.0/debian/patches/upstream_5bf798c3_Fix-ActionTextField-RTL.patch kf6-kirigami-6.13.0/debian/patches/upstream_5bf798c3_Fix-ActionTextField-RTL.patch --- kf6-kirigami-6.13.0/debian/patches/upstream_5bf798c3_Fix-ActionTextField-RTL.patch 1970-01-01 01:00:00.000000000 +0100 +++ kf6-kirigami-6.13.0/debian/patches/upstream_5bf798c3_Fix-ActionTextField-RTL.patch 2025-05-20 08:36:42.000000000 +0200 @@ -0,0 +1,86 @@ +From 5bf798c37c712bd36abdb5eb9ed70be21975d534 Mon Sep 17 00:00:00 2001 +From: Nate Graham <n...@kde.org> +Date: Tue, 13 May 2025 19:53:34 -0600 +Subject: [PATCH] Fix ActionTextField RTL + +This got broken in d8cbb0fd050861a0e08fd45192d311b65d2d4dc3, which was +not technically correct; if it worked at the time, it broke since then. + +This reverts d8cbb0fd050861a0e08fd45192d311b65d2d4dc3 + +BUG: 504091 +FIXED-IN: 6.15 +--- + src/controls/ActionTextField.qml | 11 +++++------ + src/controls/SearchField.qml | 7 +++---- + 2 files changed, 8 insertions(+), 10 deletions(-) + +diff --git a/src/controls/ActionTextField.qml b/src/controls/ActionTextField.qml +index cda63ad76..ae64d3500 100644 +--- a/src/controls/ActionTextField.qml ++++ b/src/controls/ActionTextField.qml +@@ -79,11 +79,12 @@ QQC2.TextField { + + hoverEnabled: true + +- // Manually setting this fixes alignment in RTL layouts +- horizontalAlignment: TextInput.AlignLeft ++ horizontalAlignment: Qt.AlignLeft ++ LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft ++ LayoutMirroring.childrenInherit: true + +- leftPadding: Kirigami.Units.smallSpacing + (root.effectiveHorizontalAlignment === TextInput.AlignRight ? rightActionsRow : leftActionsRow).width +- rightPadding: Kirigami.Units.smallSpacing + (root.effectiveHorizontalAlignment === TextInput.AlignRight ? leftActionsRow : rightActionsRow).width ++ leftPadding: Kirigami.Units.smallSpacing + (LayoutMirroring.enabled ? rightActionsRow : leftActionsRow).width ++ rightPadding: Kirigami.Units.smallSpacing + (LayoutMirroring.enabled ? leftActionsRow : rightActionsRow).width + + Behavior on leftPadding { + NumberAnimation { +@@ -164,7 +165,6 @@ QQC2.TextField { + padding: Kirigami.Units.smallSpacing + spacing: Kirigami.Units.smallSpacing + layoutDirection: Qt.LeftToRight +- LayoutMirroring.enabled: root.effectiveHorizontalAlignment === TextInput.AlignRight + anchors.left: parent.left + anchors.leftMargin: Kirigami.Units.smallSpacing + anchors.top: parent.top +@@ -182,7 +182,6 @@ QQC2.TextField { + padding: Kirigami.Units.smallSpacing + spacing: Kirigami.Units.smallSpacing + layoutDirection: Qt.RightToLeft +- LayoutMirroring.enabled: root.effectiveHorizontalAlignment === TextInput.AlignRight + anchors.right: parent.right + anchors.rightMargin: Kirigami.Units.smallSpacing + anchors.top: parent.top +diff --git a/src/controls/SearchField.qml b/src/controls/SearchField.qml +index b130827e2..426da6056 100644 +--- a/src/controls/SearchField.qml ++++ b/src/controls/SearchField.qml +@@ -59,12 +59,12 @@ Kirigami.ActionTextField { + property bool delaySearch: false + + // padding to accommodate search icon nicely +- leftPadding: if (effectiveHorizontalAlignment === TextInput.AlignRight) { ++ leftPadding: if (Qt.application.layoutDirection === Qt.RightToLeft) { + return _rightActionsRow.width + Kirigami.Units.smallSpacing + } else { + return searchIcon.width + Kirigami.Units.smallSpacing * 3 + } +- rightPadding: if (effectiveHorizontalAlignment === TextInput.AlignRight) { ++ rightPadding: if (Qt.application.layoutDirection === Qt.RightToLeft) { + return searchIcon.width + Kirigami.Units.smallSpacing * 3 + } else { + return _rightActionsRow.width + Kirigami.Units.smallSpacing +@@ -93,8 +93,7 @@ Kirigami.ActionTextField { + EnterKey.type: Qt.EnterKeySearch + rightActions: [ + Kirigami.Action { +- //ltr confusingly refers to the direction of the arrow in the icon, not the text direction which it should be used in +- icon.name: root.effectiveHorizontalAlignment === TextInput.AlignRight ? "edit-clear-locationbar-ltr" : "edit-clear-locationbar-rtl" ++ icon.name: root.LayoutMirroring.enabled ? "edit-clear-locationbar-ltr" : "edit-clear-locationbar-rtl" + visible: root.text.length > 0 + text: qsTr("Clear search") + onTriggered: { +-- +GitLab + diff -Nru kf6-kirigami-6.13.0/debian/patches/upstream_81352c22_layout-Set-implicit-width-of-ToolBarLayout-before-using-its-width.patch kf6-kirigami-6.13.0/debian/patches/upstream_81352c22_layout-Set-implicit-width-of-ToolBarLayout-before-using-its-width.patch --- kf6-kirigami-6.13.0/debian/patches/upstream_81352c22_layout-Set-implicit-width-of-ToolBarLayout-before-using-its-width.patch 1970-01-01 01:00:00.000000000 +0100 +++ kf6-kirigami-6.13.0/debian/patches/upstream_81352c22_layout-Set-implicit-width-of-ToolBarLayout-before-using-its-width.patch 2025-05-16 18:08:50.000000000 +0200 @@ -0,0 +1,41 @@ +From 81352c225ce742e373130eb2fc808e0b4a8f4eeb Mon Sep 17 00:00:00 2001 +From: Arjen Hiemstra <ahiems...@heimr.nl> +Date: Mon, 7 Apr 2025 17:21:41 +0200 +Subject: [PATCH] layout: Set implicit width of ToolBarLayout before using its + width + +Split setting implicit size into setting width and height separately, so +that we if we use width() it will use the implicit width if no width was +set yet. This avoids us hiding all actions because width is 0, only to +then show them again because implicit width (and thus width) is now a +valid value. +--- + src/layouts/toolbarlayout.cpp | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/layouts/toolbarlayout.cpp b/src/layouts/toolbarlayout.cpp +index dce591be3..2e214c2be 100644 +--- a/src/layouts/toolbarlayout.cpp ++++ b/src/layouts/toolbarlayout.cpp +@@ -441,6 +441,8 @@ void ToolBarLayoutPrivate::calculateImplicitSize() + + visibleActionsWidth = 0.0; + ++ q->setImplicitWidth(maxWidth); ++ + if (maxWidth > q->width() - (hiddenActions.isEmpty() ? 0.0 : moreButtonInstance->width() + spacing)) { + // We have more items than fit into the view, so start hiding some. + +@@ -473,7 +475,8 @@ void ToolBarLayoutPrivate::calculateImplicitSize() + maxHeight = std::max(maxHeight, moreButtonInstance->implicitHeight()); + }; + +- q->setImplicitSize(maxWidth, maxHeight); ++ q->setImplicitHeight(maxHeight); ++ + Q_EMIT q->hiddenActionsChanged(); + + implicitSizeValid = true; +-- +GitLab + diff -Nru kf6-kirigami-6.13.0/debian/patches/upstream_82abc769_controls-Fix-link-activation-for-text-of-InlineMessage.patch kf6-kirigami-6.13.0/debian/patches/upstream_82abc769_controls-Fix-link-activation-for-text-of-InlineMessage.patch --- kf6-kirigami-6.13.0/debian/patches/upstream_82abc769_controls-Fix-link-activation-for-text-of-InlineMessage.patch 1970-01-01 01:00:00.000000000 +0100 +++ kf6-kirigami-6.13.0/debian/patches/upstream_82abc769_controls-Fix-link-activation-for-text-of-InlineMessage.patch 2025-05-16 18:14:39.000000000 +0200 @@ -0,0 +1,68 @@ +From 82abc7690b79556499d5ae25b223ca358618c72f Mon Sep 17 00:00:00 2001 +From: Arjen Hiemstra <ahiems...@heimr.nl> +Date: Mon, 7 Apr 2025 17:26:11 +0200 +Subject: [PATCH] controls: Fix link activation for text of InlineMessage + +Rather than stretching both the label and toolbar across the entire +inline message, use implicit width for both, unless either would become +larger than the InlineMessage width. Most importantly, since the toolbar +only takes space that is not used by the text, this avoids links in the +text not working correctly. + +BUG: 500578 +--- + src/controls/templates/InlineMessage.qml | 15 ++++++--------- + 1 file changed, 6 insertions(+), 9 deletions(-) + +diff --git a/src/controls/templates/InlineMessage.qml b/src/controls/templates/InlineMessage.qml +index 6781c437e3..ecf3b66556 100644 +--- a/src/controls/templates/InlineMessage.qml ++++ b/src/controls/templates/InlineMessage.qml +@@ -216,13 +216,9 @@ T.Control { + + Accessible.ignored: true + +- readonly property real remainingWidth: width - ( +- icon.width +- + label.anchors.leftMargin + label.implicitWidth + label.anchors.rightMargin +- + (root.showCloseButton ? closeButton.width : 0) +- ) ++ readonly property real fixedContentWidth: icon.width + Kirigami.Units.smallSpacing * 3 + (root.showCloseButton ? closeButton.width + Kirigami.Units.smallSpacing : 0) ++ readonly property real remainingWidth: width - fixedContentWidth - label.implicitWidth + readonly property bool multiline: remainingWidth <= 0 || atBottom +- + readonly property bool atBottom: (root.actions.length > 0) && (label.lineCount > 1 || actionsLayout.implicitWidth > remainingWidth) + + Kirigami.Icon { +@@ -302,11 +298,11 @@ T.Control { + anchors { + left: icon.right + leftMargin: Kirigami.Units.largeSpacing +- right: root.showCloseButton ? closeButton.left : parent.right +- rightMargin: root.showCloseButton ? Kirigami.Units.smallSpacing : 0 + top: parent.top + } + ++ width: Math.min(parent.width - parent.fixedContentWidth, implicitWidth) ++ + color: Kirigami.Theme.textColor + wrapMode: Text.WordWrap + +@@ -358,12 +354,13 @@ T.Control { + alignment: Qt.AlignRight + + anchors { +- left: parent.left + top: contentLayout.atBottom ? label.bottom : parent.top + topMargin: contentLayout.atBottom ? Kirigami.Units.largeSpacing : 0 + right: (!contentLayout.atBottom && root.showCloseButton) ? closeButton.left : parent.right + rightMargin: !contentLayout.atBottom && root.showCloseButton ? Kirigami.Units.smallSpacing : 0 + } ++ ++ width: Math.min(implicitWidth, parent.width) + } + + QQC2.ToolButton { +-- +GitLab + diff -Nru kf6-kirigami-6.13.0/debian/patches/upstream_bae0957d_controls-Remove-redundant-states-from-InlineMessage.patch kf6-kirigami-6.13.0/debian/patches/upstream_bae0957d_controls-Remove-redundant-states-from-InlineMessage.patch --- kf6-kirigami-6.13.0/debian/patches/upstream_bae0957d_controls-Remove-redundant-states-from-InlineMessage.patch 1970-01-01 01:00:00.000000000 +0100 +++ kf6-kirigami-6.13.0/debian/patches/upstream_bae0957d_controls-Remove-redundant-states-from-InlineMessage.patch 2025-05-16 18:15:04.000000000 +0200 @@ -0,0 +1,89 @@ +From bae0957d48d1f6c5d46dde05c5edb4bf709da519 Mon Sep 17 00:00:00 2001 +From: Arjen Hiemstra <ahiems...@heimr.nl> +Date: Tue, 8 Apr 2025 11:12:26 +0200 +Subject: [PATCH] controls: Remove redundant states from InlineMessage + +States describe changes from a base state. The base state can just be +declared normally, there is no need to declare it as a separate state. +This fixes centering the close button in single-line inline messages, +because the "centered" state was never activated. +--- + src/controls/templates/InlineMessage.qml | 44 +++++++----------------- + 1 file changed, 13 insertions(+), 31 deletions(-) + +diff --git a/src/controls/templates/InlineMessage.qml b/src/controls/templates/InlineMessage.qml +index f8a868891..f293c4b1e 100644 +--- a/src/controls/templates/InlineMessage.qml ++++ b/src/controls/templates/InlineMessage.qml +@@ -300,6 +300,7 @@ T.Control { + left: icon.right + leftMargin: Kirigami.Units.largeSpacing + top: parent.top ++ bottom: parent.bottom + } + + width: Math.min(parent.width - parent.fixedContentWidth, implicitWidth) +@@ -326,16 +327,6 @@ T.Control { + target: label + height: label.implicitHeight + } +- }, +- // States are evaluated in the order they are declared. +- // This is a fallback state. +- State { +- name: "single-line" +- when: true +- AnchorChanges { +- target: label +- anchors.bottom: label.parent.bottom +- } + } + ] + +@@ -368,31 +359,22 @@ T.Control { + + visible: root.showCloseButton + +- anchors.right: parent.right ++ anchors { ++ verticalCenter: parent.verticalCenter ++ right: parent.right ++ } + + // Incompatible anchors need to be evaluated in a given order, + // which simple declarative bindings cannot assure +- states: [ +- State { +- name: "onTop" +- when: contentLayout.atBottom +- AnchorChanges { +- target: closeButton +- anchors.top: parent.top +- anchors.verticalCenter: undefined +- } +- } , +- State { +- name: "centered" +- AnchorChanges { +- target: closeButton +- anchors.top: undefined +- anchors.verticalCenter: parent.verticalCenter +- } ++ states: State { ++ name: "onTop" ++ when: contentLayout.atBottom ++ AnchorChanges { ++ target: closeButton ++ anchors.top: parent.top ++ anchors.verticalCenter: undefined + } +- ] +- +- height: contentLayout.atBottom ? implicitHeight : implicitHeight ++ } + + text: qsTr("Close") + display: QQC2.ToolButton.IconOnly +-- +GitLab + diff -Nru kf6-kirigami-6.13.0/debian/patches/upstream_bf7ead57_tst-scrolling-qml-don-t-set-default-angle-delta-to-verticalStepSize-don-t-test-if-smooth-scrolling-is-enabled-when-testing-angle-delta-moves.patch kf6-kirigami-6.13.0/debian/patches/upstream_bf7ead57_tst-scrolling-qml-don-t-set-default-angle-delta-to-verticalStepSize-don-t-test-if-smooth-scrolling-is-enabled-when-testing-angle-delta-moves.patch --- kf6-kirigami-6.13.0/debian/patches/upstream_bf7ead57_tst-scrolling-qml-don-t-set-default-angle-delta-to-verticalStepSize-don-t-test-if-smooth-scrolling-is-enabled-when-testing-angle-delta-moves.patch 1970-01-01 01:00:00.000000000 +0100 +++ kf6-kirigami-6.13.0/debian/patches/upstream_bf7ead57_tst-scrolling-qml-don-t-set-default-angle-delta-to-verticalStepSize-don-t-test-if-smooth-scrolling-is-enabled-when-testing-angle-delta-moves.patch 2025-05-16 18:19:41.000000000 +0200 @@ -0,0 +1,99 @@ +From bf7ead578d39c9b279c5fd8f4e458923280a4dcb Mon Sep 17 00:00:00 2001 +From: Noah Davis <noaha...@gmail.com> +Date: Mon, 14 Apr 2025 13:54:25 -0400 +Subject: [PATCH] tst_scrolling.qml: don't set default angle delta to + verticalStepSize, don't test if smooth scrolling is enabled when testing + angle delta moves + +While arbitrary angle deltas are allowed, setting the default angle delta size to verticalStepSize is not semantically correct because verticalStepSize is not an angle delta. + +We shouldn't make more assumptions about WheelHandler's internal logic than necessary since there is already a way to avoid failing the test when smooth scrolling is enabled. +--- + autotests/wheelhandler/tst_scrolling.qml | 50 +++++------------------- + 1 file changed, 9 insertions(+), 41 deletions(-) + +diff --git a/autotests/wheelhandler/tst_scrolling.qml b/autotests/wheelhandler/tst_scrolling.qml +index 425dcc995..bde386655 100644 +--- a/autotests/wheelhandler/tst_scrolling.qml ++++ b/autotests/wheelhandler/tst_scrolling.qml +@@ -24,36 +24,20 @@ TestCase { + width: flickable.implicitWidth + height: flickable.implicitHeight + +- function wheelScrolling(angleDelta = wheelHandler.verticalStepSize) { ++ function wheelScrolling(angleDelta = 120) { + let x = flickable.contentX + let y = flickable.contentY + const angleDeltaFactor = angleDelta / 120 + mouseWheel(flickable, flickable.leftMargin, 0, -angleDelta, -angleDelta, Qt.NoButton) +- if (angleDelta === wheelHandler.verticalStepSize) { +- tryCompare(flickable, "contentX", Math.round(x + hstep * angleDeltaFactor), Kirigami.Units.longDuration * 2, "+xTick") +- } else { +- compare(flickable.contentX, Math.round(x + hstep * angleDeltaFactor), "+xTick") +- } ++ tryCompare(flickable, "contentX", Math.round(x + hstep * angleDeltaFactor), Kirigami.Units.longDuration * 2, "+xTick") + x = flickable.contentX +- if (angleDelta === wheelHandler.verticalStepSize) { +- tryCompare(flickable, "contentY", Math.round(y + vstep * angleDeltaFactor), Kirigami.Units.longDuration * 2, "+yTick") +- } else { +- compare(flickable.contentY, Math.round(y + vstep * angleDeltaFactor), "+yTick") +- } ++ tryCompare(flickable, "contentY", Math.round(y + vstep * angleDeltaFactor), Kirigami.Units.longDuration * 2, "+yTick") + y = flickable.contentY + + mouseWheel(flickable, flickable.leftMargin, 0, angleDelta, angleDelta, Qt.NoButton) +- if (angleDelta === wheelHandler.verticalStepSize) { +- tryCompare(flickable, "contentX", Math.round(x - hstep * angleDeltaFactor), Kirigami.Units.longDuration * 2, "-xTick") +- } else { +- compare(flickable.contentX, Math.round(x - hstep * angleDeltaFactor), "-xTick") +- } ++ tryCompare(flickable, "contentX", Math.round(x - hstep * angleDeltaFactor), Kirigami.Units.longDuration * 2, "-xTick") + x = flickable.contentX +- if (angleDelta === wheelHandler.verticalStepSize) { +- tryCompare(flickable, "contentY", Math.round(y - vstep * angleDeltaFactor), Kirigami.Units.longDuration * 2, "-yTick") +- } else { +- compare(flickable.contentY, Math.round(y - vstep * angleDeltaFactor), "-yTick") +- } ++ tryCompare(flickable, "contentY", Math.round(y - vstep * angleDeltaFactor), Kirigami.Units.longDuration * 2, "-yTick") + y = flickable.contentY + + if (Qt.platform.pluginName !== "xcb") { +@@ -69,31 +53,15 @@ TestCase { + } + + mouseWheel(flickable, flickable.leftMargin, 0, -angleDelta, -angleDelta, Qt.NoButton, wheelHandler.pageScrollModifiers) +- if (angleDelta === wheelHandler.verticalStepSize) { +- tryCompare(flickable, "contentX", Math.round(x + pageWidth * angleDeltaFactor), Kirigami.Units.longDuration * 2, "+xPage") +- } else { +- compare(flickable.contentX, Math.round(x + pageWidth * angleDeltaFactor), "+xPage") +- } ++ tryCompare(flickable, "contentX", Math.round(x + pageWidth * angleDeltaFactor), Kirigami.Units.longDuration * 2, "+xPage") + x = flickable.contentX +- if (angleDelta === wheelHandler.verticalStepSize) { +- tryCompare(flickable, "contentY", Math.round(y + pageHeight * angleDeltaFactor), Kirigami.Units.longDuration * 2, "+yPage") +- } else { +- compare(flickable.contentY, Math.round(y + pageHeight * angleDeltaFactor), "+yPage") +- } ++ tryCompare(flickable, "contentY", Math.round(y + pageHeight * angleDeltaFactor), Kirigami.Units.longDuration * 2, "+yPage") + y = flickable.contentY + + mouseWheel(flickable, flickable.leftMargin, 0, angleDelta, angleDelta, Qt.NoButton, wheelHandler.pageScrollModifiers) +- if (angleDelta === wheelHandler.verticalStepSize) { +- tryCompare(flickable, "contentX", Math.round(x - pageWidth * angleDeltaFactor), Kirigami.Units.longDuration * 2, "-xPage") +- } else { +- compare(flickable.contentX, Math.round(x - pageWidth * angleDeltaFactor), "-xPage") +- } ++ tryCompare(flickable, "contentX", Math.round(x - pageWidth * angleDeltaFactor), Kirigami.Units.longDuration * 2, "-xPage") + x = flickable.contentX +- if (angleDelta === wheelHandler.verticalStepSize) { +- tryCompare(flickable, "contentY", Math.round(y - pageHeight * angleDeltaFactor), Kirigami.Units.longDuration * 2, "-yPage") +- } else { +- compare(flickable.contentY, Math.round(y - pageHeight * angleDeltaFactor), "-yPage") +- } ++ tryCompare(flickable, "contentY", Math.round(y - pageHeight * angleDeltaFactor), Kirigami.Units.longDuration * 2, "-yPage") + y = flickable.contentY + + if (Qt.platform.pluginName !== "xcb") { +-- +GitLab + diff -Nru kf6-kirigami-6.13.0/debian/patches/upstream_d803ca35_SearchField-fix-RTL-search-icon-positioning.patch kf6-kirigami-6.13.0/debian/patches/upstream_d803ca35_SearchField-fix-RTL-search-icon-positioning.patch --- kf6-kirigami-6.13.0/debian/patches/upstream_d803ca35_SearchField-fix-RTL-search-icon-positioning.patch 1970-01-01 01:00:00.000000000 +0100 +++ kf6-kirigami-6.13.0/debian/patches/upstream_d803ca35_SearchField-fix-RTL-search-icon-positioning.patch 2025-05-20 08:38:42.000000000 +0200 @@ -0,0 +1,30 @@ +From d803ca3583838eb9e4a6854763be45be91925523 Mon Sep 17 00:00:00 2001 +From: Nate Graham <n...@kde.org> +Date: Thu, 8 May 2025 15:21:50 -0600 +Subject: [PATCH] SearchField fix RTL search icon positioning + +We're overriding the value of LayoutMirroring.enabled unnecessarily and +incorrectly, causing the icon to always appear on the left regardless of +RTL. Just let it cascade to this component normally. + +BUG: 503012 +FIXED-IN: 6.15 +--- + src/controls/SearchField.qml | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/controls/SearchField.qml b/src/controls/SearchField.qml +index 806871f56..b130827e2 100644 +--- a/src/controls/SearchField.qml ++++ b/src/controls/SearchField.qml +@@ -72,7 +72,6 @@ Kirigami.ActionTextField { + + Kirigami.Icon { + id: searchIcon +- LayoutMirroring.enabled: root.effectiveHorizontalAlignment === TextInput.AlignRight + anchors.left: root.left + anchors.leftMargin: Kirigami.Units.smallSpacing * 2 + anchors.verticalCenter: root.verticalCenter +-- +GitLab + diff -Nru kf6-kirigami-6.13.0/debian/patches/upstream_e3c6af3b_layouts-Always-relayout-on-geometry-changes-in-ToolBarLayout.patch kf6-kirigami-6.13.0/debian/patches/upstream_e3c6af3b_layouts-Always-relayout-on-geometry-changes-in-ToolBarLayout.patch --- kf6-kirigami-6.13.0/debian/patches/upstream_e3c6af3b_layouts-Always-relayout-on-geometry-changes-in-ToolBarLayout.patch 1970-01-01 01:00:00.000000000 +0100 +++ kf6-kirigami-6.13.0/debian/patches/upstream_e3c6af3b_layouts-Always-relayout-on-geometry-changes-in-ToolBarLayout.patch 2025-05-16 18:06:06.000000000 +0200 @@ -0,0 +1,31 @@ +From e3c6af3b9169f0abb5bad9c809e0065410c1f9c8 Mon Sep 17 00:00:00 2001 +From: Arjen Hiemstra <ahiems...@heimr.nl> +Date: Mon, 7 Apr 2025 17:15:24 +0200 +Subject: [PATCH] layouts: Always relayout on geometry changes in ToolBarLayout + +Otherwise we end up with several corner cases where the implicit width +is the same as width but we still have actions hidden. +--- + src/layouts/toolbarlayout.cpp | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/src/layouts/toolbarlayout.cpp b/src/layouts/toolbarlayout.cpp +index a4ef08265..dce591be3 100644 +--- a/src/layouts/toolbarlayout.cpp ++++ b/src/layouts/toolbarlayout.cpp +@@ -348,11 +348,7 @@ void ToolBarLayout::componentComplete() + void ToolBarLayout::geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) + { + if (newGeometry != oldGeometry) { +- if (newGeometry.size() != QSizeF{implicitWidth(), implicitHeight()}) { +- relayout(); +- } else { +- polish(); +- } ++ relayout(); + } + QQuickItem::geometryChange(newGeometry, oldGeometry); + } +-- +GitLab + diff -Nru kf6-kirigami-6.13.0/debian/patches/upstream_fb21ee82_WheelHandler-smooth-scroll-for-a-greater-variety-of-movement-sizes.patch kf6-kirigami-6.13.0/debian/patches/upstream_fb21ee82_WheelHandler-smooth-scroll-for-a-greater-variety-of-movement-sizes.patch --- kf6-kirigami-6.13.0/debian/patches/upstream_fb21ee82_WheelHandler-smooth-scroll-for-a-greater-variety-of-movement-sizes.patch 1970-01-01 01:00:00.000000000 +0100 +++ kf6-kirigami-6.13.0/debian/patches/upstream_fb21ee82_WheelHandler-smooth-scroll-for-a-greater-variety-of-movement-sizes.patch 2025-05-16 18:19:19.000000000 +0200 @@ -0,0 +1,125 @@ +From fb21ee822f448136bfa032e0da5faca6ffc82b72 Mon Sep 17 00:00:00 2001 +From: Noah Davis <noaha...@gmail.com> +Date: Mon, 14 Apr 2025 13:49:23 -0400 +Subject: [PATCH] WheelHandler: smooth scroll for a greater variety of movement + sizes + +Duration is based on the duration and movement for 120 angle delta. +Shorten duration for smaller movements, limit duration for big movements. +We don't want fine deltas to feel extra slow and fast scrolling should still feel fast. +Minimum 3 frames for a 60hz display if delta > 2 physical pixels +(start already rendered -> 1/3 rendered -> 2/3 rendered -> end rendered). +Skip animation if <= 2 real frames for low refresh rate screens. +Otherwise, we don't scale the duration based on refresh rate or +device pixel ratio to avoid making the animation unexpectedly +longer or shorter on different screens. + +BUG: 484309 +--- + src/wheelhandler.cpp | 56 +++++++++++++++++++++++++------------------- + src/wheelhandler.h | 1 - + 2 files changed, 32 insertions(+), 25 deletions(-) + +diff --git a/src/wheelhandler.cpp b/src/wheelhandler.cpp +index f8734a1211..dc88b50de2 100644 +--- a/src/wheelhandler.cpp ++++ b/src/wheelhandler.cpp +@@ -388,25 +388,12 @@ void WheelHandler::classBegin() + m_engine = qmlEngine(this); + m_units = m_engine->singletonInstance<Kirigami::Platform::Units *>("org.kde.kirigami.platform", "Units"); + m_settings = m_engine->singletonInstance<Kirigami::Platform::Settings *>("org.kde.kirigami.platform", "Settings"); +- initSmoothScrollDuration(); +- +- connect(m_units, &Kirigami::Platform::Units::longDurationChanged, this, &WheelHandler::initSmoothScrollDuration); +- connect(m_settings, &Kirigami::Platform::Settings::smoothScrollChanged, this, &WheelHandler::initSmoothScrollDuration); + } + + void WheelHandler::componentComplete() + { + } + +-void WheelHandler::initSmoothScrollDuration() +-{ +- if (m_settings->smoothScroll()) { +- m_yScrollAnimation.setDuration(m_units->longDuration()); +- } else { +- m_yScrollAnimation.setDuration(0); +- } +-} +- + void WheelHandler::setScrolling(bool scrolling) + { + if (m_wheelScrolling == scrolling) { +@@ -514,11 +501,39 @@ bool WheelHandler::scrollFlickable(QPointF pixelDelta, QPointF angleDelta, Qt::K + newContentY = std::round(newContentY * devicePixelRatio) / devicePixelRatio; + if (contentY != newContentY) { + scrolled = true; +- if (m_wasTouched || !m_engine) { +- m_flickable->setProperty("contentY", newContentY); ++ // Can't use wheelEvent->deviceType() to determine device type since ++ // on Wayland mouse is always regarded as touchpad: ++ // https://invent.kde.org/qt/qt/qtwayland/-/blob/e695a39519a7629c1549275a148cfb9ab99a07a9/src/client/qwaylandinputdevice.cpp#L445 ++ // Mouse wheel can generate angle delta like 240, 360 and so on when ++ // scrolling very fast on some mice such as the Logitech M150. ++ // Mice with hi-res mouse wheels such as the Logitech MX Master 3 can ++ // generate angle deltas as small as 16. ++ // On X11, trackpads can also generate very fine angle deltas. ++ qreal refreshRate = window && window->screen() ? window->screen()->refreshRate() : 0; ++ if (m_settings->smoothScroll() && m_engine && refreshRate > 0) { ++ // Duration is based on the duration and movement for 120 angle delta. ++ // Shorten duration for smaller movements, limit duration for big movements. ++ // We don't want fine deltas to feel extra slow and fast scrolling should still feel fast. ++ // Minimum 3 frames for a 60hz display if delta > 2 physical pixels ++ // (start already rendered -> 1/3 rendered -> 2/3 rendered -> end rendered). ++ // Skip animation if <= 2 real frames for low refresh rate screens. ++ // Otherwise, we don't scale the duration based on refresh rate or ++ // device pixel ratio to avoid making the animation unexpectedly ++ // longer or shorter on different screens. ++ qreal absPixelDelta = std::abs(newContentY - contentY); ++ int duration = absPixelDelta * devicePixelRatio > 2 // ++ ? std::clamp(qRound(absPixelDelta * m_units->longDuration() / m_verticalStepSize), qCeil(1000.0 / 60.0 * 3), m_units->longDuration()) ++ : 0; ++ m_yScrollAnimation.setDuration(duration <= qCeil(1000.0 / refreshRate * 2) ? 0 : duration); ++ if (m_yScrollAnimation.duration() > 0) { ++ m_yScrollAnimation.setEndValue(newContentY); ++ m_yScrollAnimation.start(QAbstractAnimation::KeepWhenStopped); ++ } else { ++ m_flickable->setProperty("contentY", newContentY); ++ } + } else { +- m_yScrollAnimation.setEndValue(newContentY); +- m_yScrollAnimation.start(QAbstractAnimation::KeepWhenStopped); ++ m_yScrollAnimation.setDuration(0); ++ m_flickable->setProperty("contentY", newContentY); + } + } + } +@@ -602,13 +617,6 @@ bool WheelHandler::eventFilter(QObject *watched, QEvent *event) + } + QWheelEvent *wheelEvent = static_cast<QWheelEvent *>(event); + +- // Can't use wheelEvent->deviceType() to determine device type since on Wayland mouse is always regarded as touchpad +- // https://invent.kde.org/qt/qt/qtwayland/-/blob/e695a39519a7629c1549275a148cfb9ab99a07a9/src/client/qwaylandinputdevice.cpp#L445 +- // and we can only expect a touchpad never generates the same angle delta as a mouse +- +- // mouse wheel can also generate angle delta like 240, 360 and so on when scrolling very fast +- // only checking wheelEvent->angleDelta().y() because we only animate for contentY +- m_wasTouched = (std::abs(wheelEvent->angleDelta().y()) != 0 && std::abs(wheelEvent->angleDelta().y()) % 120 != 0); + // NOTE: On X11 with libinput, pixelDelta is identical to angleDelta when using a mouse that shouldn't use pixelDelta. + // If faulty pixelDelta, reset pixelDelta to (0,0). + if (wheelEvent->pixelDelta() == wheelEvent->angleDelta()) { +diff --git a/src/wheelhandler.h b/src/wheelhandler.h +index 70ff9d9c78..b1a4d269fa 100644 +--- a/src/wheelhandler.h ++++ b/src/wheelhandler.h +@@ -361,7 +361,6 @@ private Q_SLOTS: + private: + void classBegin() override; + void componentComplete() override; +- void initSmoothScrollDuration(); + + void setScrolling(bool scrolling); + bool scrollFlickable(QPointF pixelDelta, QPointF angleDelta = {}, Qt::KeyboardModifiers modifiers = Qt::NoModifier); +-- +GitLab +