diff --git a/.gitignore b/.gitignore index c554c82..97b9f05 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1 @@ -/qqc2-desktop-style-5.39.0.tar.xz -/qqc2-desktop-style-5.40.0.tar.xz -/qqc2-desktop-style-5.41.0.tar.xz -/qqc2-desktop-style-5.42.0.tar.xz -/qqc2-desktop-style-5.43.0.tar.xz -/qqc2-desktop-style-5.44.0.tar.xz -/qqc2-desktop-style-5.45.0.tar.xz /qqc2-desktop-style-5.46.0.tar.xz diff --git a/0001-constrain-scroll.patch b/0001-constrain-scroll.patch new file mode 100644 index 0000000..cacbef0 --- /dev/null +++ b/0001-constrain-scroll.patch @@ -0,0 +1,52 @@ +From 892f60a6f8bf5e9f8f0eb6c9539efcd53d77d2c2 Mon Sep 17 00:00:00 2001 +From: Marco Martin +Date: Wed, 9 May 2018 14:31:58 +0200 +Subject: [PATCH 1/6] constrain scroll + +BUG:393992 +--- + org.kde.desktop/ScrollBar.qml | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/org.kde.desktop/ScrollBar.qml b/org.kde.desktop/ScrollBar.qml +index 5d15e26..1051dde 100644 +--- a/org.kde.desktop/ScrollBar.qml ++++ b/org.kde.desktop/ScrollBar.qml +@@ -34,6 +34,7 @@ T.ScrollBar { + hoverEnabled: true + + visible: controlRoot.size < 1.0 ++ stepSize: 0.02 + + background: MouseArea { + id: mouseArea +@@ -45,11 +46,11 @@ T.ScrollBar { + onExited: style.activeControl = "groove"; + onPressed: { + if (style.activeControl == "down") { +- buttonTimer.increment = 0.02; ++ buttonTimer.increment = 1; + buttonTimer.running = true; + mouse.accepted = true + } else if (style.activeControl == "up") { +- buttonTimer.increment = -0.02; ++ buttonTimer.increment = -1; + buttonTimer.running = true; + mouse.accepted = true + } else { +@@ -88,7 +89,11 @@ T.ScrollBar { + repeat: true + interval: 150 + onTriggered: { +- controlRoot.position += increment; ++ if (increment > 0) { ++ controlRoot.increase(); ++ } else { ++ controlRoot.decrease(); ++ } + } + } + } +-- +2.14.3 + diff --git a/0003-Control-must-not-have-children.patch b/0003-Control-must-not-have-children.patch new file mode 100644 index 0000000..8c1b910 --- /dev/null +++ b/0003-Control-must-not-have-children.patch @@ -0,0 +1,28 @@ +From 8790d850c4343b9f615457f0926cc3cdcef8d0c7 Mon Sep 17 00:00:00 2001 +From: Marco Martin +Date: Mon, 14 May 2018 20:08:40 +0200 +Subject: [PATCH 3/6] Control must not have children + +this invisible child interfers badly with Kirigami FormLayout + +BUG:394134 +--- + org.kde.desktop/Control.qml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/org.kde.desktop/Control.qml b/org.kde.desktop/Control.qml +index 40d8425..ce49342 100644 +--- a/org.kde.desktop/Control.qml ++++ b/org.kde.desktop/Control.qml +@@ -37,7 +37,7 @@ T.Control { + rightPadding: styleItem.pixelMetric("layoutrightmargin") + bottomPadding: styleItem.pixelMetric("layoutbottommargin") + +- StylePrivate.StyleItem { ++ property Item __style: StylePrivate.StyleItem { + id: styleItem + } + } +-- +2.14.3 + diff --git a/0004-Fix-warning.patch b/0004-Fix-warning.patch new file mode 100644 index 0000000..2575d4a --- /dev/null +++ b/0004-Fix-warning.patch @@ -0,0 +1,25 @@ +From c6ce523e6994e94113adced3168ae43731d3af4a Mon Sep 17 00:00:00 2001 +From: Aleix Pol +Date: Wed, 16 May 2018 13:14:57 +0200 +Subject: [PATCH 4/6] Fix warning + +Don't access property that doesn't exist. +--- + org.kde.desktop/TextArea.qml | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/org.kde.desktop/TextArea.qml b/org.kde.desktop/TextArea.qml +index 33cc430..6c97280 100644 +--- a/org.kde.desktop/TextArea.qml ++++ b/org.kde.desktop/TextArea.qml +@@ -70,7 +70,6 @@ T.TextArea { + background: StylePrivate.StyleItem { + id: style + control: controlRoot +- visible: controlRoot.backgroundVisible + elementType: "edit" + implicitWidth: 200 + implicitHeight: 22 +-- +2.14.3 + diff --git a/0005-TabBar-Switch-tabs-with-mouse-wheel.patch b/0005-TabBar-Switch-tabs-with-mouse-wheel.patch new file mode 100644 index 0000000..4f7a22b --- /dev/null +++ b/0005-TabBar-Switch-tabs-with-mouse-wheel.patch @@ -0,0 +1,37 @@ +From 670f6771aa7f214d6a7318b24d0109a3f15eb73c Mon Sep 17 00:00:00 2001 +From: Kai Uwe Broulik +Date: Wed, 16 May 2018 13:37:04 +0200 +Subject: [PATCH 5/6] [TabBar] Switch tabs with mouse wheel + +Makes it consistent with QTabWidget + +Differential Revision: https://phabricator.kde.org/D12923 +--- + org.kde.desktop/TabBar.qml | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/org.kde.desktop/TabBar.qml b/org.kde.desktop/TabBar.qml +index 57565d9..66609c1 100644 +--- a/org.kde.desktop/TabBar.qml ++++ b/org.kde.desktop/TabBar.qml +@@ -66,7 +66,16 @@ T.TabBar { + } + } + +- background: Item { ++ background: MouseArea { ++ acceptedButtons: Qt.NoButton ++ onWheel: { ++ if (wheel.pixelDelta.y < 0 || wheel.angleDelta.y < 0) { ++ controlRoot.currentIndex = Math.min(controlRoot.currentIndex + 1, controlRoot.contentModel.count -1); ++ } else { ++ controlRoot.currentIndex = Math.max(controlRoot.currentIndex - 1, 0); ++ } ++ } ++ + Rectangle { + anchors { + left: parent.left +-- +2.14.3 + diff --git a/0006-Add-test-file-for-ScrollView-TextArea.patch b/0006-Add-test-file-for-ScrollView-TextArea.patch new file mode 100644 index 0000000..a598bd9 --- /dev/null +++ b/0006-Add-test-file-for-ScrollView-TextArea.patch @@ -0,0 +1,29 @@ +From d3f21aee2f8f9dc7ce629f85a66b749291ba83e2 Mon Sep 17 00:00:00 2001 +From: Aleix Pol +Date: Wed, 16 May 2018 15:13:59 +0200 +Subject: [PATCH 6/6] Add test file for ScrollView { TextArea {} } + +--- + tests/textAreaWithScrollView.qml | 10 ++++++++++ + 1 file changed, 10 insertions(+) + create mode 100644 tests/textAreaWithScrollView.qml + +diff --git a/tests/textAreaWithScrollView.qml b/tests/textAreaWithScrollView.qml +new file mode 100644 +index 0000000..6b79f3a +--- /dev/null ++++ b/tests/textAreaWithScrollView.qml +@@ -0,0 +1,10 @@ ++import QtQuick 2.3 ++import QtQuick.Controls 2.4 ++ ++ScrollView { ++ height: 100 ++ width: 300 ++ TextArea { ++ text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur ultricies consequat nulla, ut vulputate nulla ultricies ac. Suspendisse lacinia commodo lacus, non tristique mauris dictum vitae. Sed adipiscing augue nec nisi aliquet viverra. Etiam sit amet nulla in tellus consectetur feugiat. Cras in sem tortor. Fusce a nulla at justo accumsan gravida. Maecenas dui felis, lacinia at ornare sed, aliquam et purus. Sed ut sagittis lacus. Etiam dictum pharetra rhoncus. Suspendisse auctor orci ipsum. Pellentesque vitae urna nec felis consequat lobortis dictum in urna. Phasellus a mi ac leo adipiscing varius eget a felis. Cras magna augue, commodo sed placerat vel, tempus vel ligula. In feugiat quam quis est lobortis sed accumsan nunc malesuada. Mauris quis massa sit amet felis tempus suscipit a quis diam.\n\n" + "Aenean quis nulla erat, vel sagittis sem. Praesent vitae mauris arcu. Cras porttitor, ante at scelerisque sodales, nibh felis consectetur orci, ut hendrerit urna urna non urna. Duis eu magna id mi scelerisque adipiscing. Aliquam sed quam in eros sodales accumsan. Phasellus tempus sagittis suscipit. Aliquam rutrum dictum justo ut viverra. Nulla felis sem, molestie sed scelerisque non, consequat vitae nulla. Aliquam ullamcorper malesuada mi, vel vestibulum magna vulputate eget. In hac habitasse platea dictumst. Cras sed lacus dui, vel semper sem. Aenean sodales porta leo vel fringilla.\n\n" + "Ut tempus massa et urna porta non mollis metus ultricies. Duis nec nulla ac metus auctor porta id et mi. Mauris aliquam nibh a ligula malesuada sed tincidunt nibh varius. Sed felis metus, porta et adipiscing non, faucibus id leo. Donec ipsum nibh, hendrerit eget aliquam nec, tempor ut mauris. Suspendisse potenti. Vestibulum scelerisque adipiscing libero tristique eleifend. Donec quis tortor eget elit mollis iaculis ac sit amet nisi. Proin non massa sed nunc rutrum pellentesque. Sed dui lectus, laoreet sed condimentum id, commodo sed urna.\n\n" + "Praesent tincidunt mattis massa mattis porta. Nullam posuere neque at mauris vestibulum vitae elementum leo sodales. Quisque condimentum lectus in libero luctus egestas. Fusce tempor neque ac dui tincidunt eget viverra quam suscipit. In hac habitasse platea dictumst. Etiam metus mi, adipiscing nec suscipit id, aliquet sed sem. Duis urna ligula, ornare sed vestibulum vel, molestie ac nisi. Morbi varius iaculis ligula. Nunc in augue leo, sit amet aliquam elit. Suspendisse rutrum sem diam. Proin eu orci nisl. Praesent porttitor dignissim est, id fermentum arcu venenatis vitae.\n\n" + "Integer in sapien eget quam vulputate lobortis. Morbi nibh elit, elementum vitae vehicula sed, consequat nec erat. Donec placerat porttitor est ut dapibus. Fusce augue orci, dictum et convallis vel, blandit eu tortor. Phasellus non eros nulla. In iaculis nulla fermentum nulla gravida eu mattis purus consectetur. Integer dui nunc, sollicitudin ac tincidunt nec, hendrerit bibendum nunc. Proin sit amet augue ac velit egestas varius. Sed eu ante quis orci vestibulum sagittis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus vitae urna odio, at molestie leo. In convallis neque vel mi dictum convallis lobortis turpis sagittis.\n\n" ++ } ++} +-- +2.14.3 + diff --git a/qqc2-desktop-style.spec b/qqc2-desktop-style.spec index b8960b2..f57f810 100644 --- a/qqc2-desktop-style.spec +++ b/qqc2-desktop-style.spec @@ -2,7 +2,7 @@ Name: %{framework} Version: 5.46.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: QtQuickControls2 style for consistency between QWidget and QML apps # kirigami-plasmadesktop-integration: LGPLv2+ @@ -19,6 +19,13 @@ URL: https://cgit.kde.org/%{framework}.git %endif Source0: http://download.kde.org/%{stable}/frameworks/%{majmin}/%{framework}-%{version}.tar.xz +## upstream patches +Patch1: 0001-constrain-scroll.patch +Patch3: 0003-Control-must-not-have-children.patch +Patch4: 0004-Fix-warning.patch +Patch5: 0005-TabBar-Switch-tabs-with-mouse-wheel.patch +Patch6: 0006-Add-test-file-for-ScrollView-TextArea.patch + BuildRequires: extra-cmake-modules >= %{majmin} BuildRequires: kf5-rpm-macros BuildRequires: kf5-kirigami2-devel >= %{majmin} @@ -52,7 +59,7 @@ pushd %{_target_platform} %{cmake_kf5} .. popd -make %{?_smp_mflags} -C %{_target_platform} +%make_build -C %{_target_platform} %install @@ -71,6 +78,9 @@ make install/fast DESTDIR=%{buildroot} -C %{_target_platform} %changelog +* Wed May 16 2018 Rex Dieter - 5.46.0-2 +- pull in upstream fixes, use %%make_build + * Sat May 05 2018 Rex Dieter - 5.46.0-1 - 5.46.0