commit:     aceaa84b71d81f9a8f1633b1f1910b77c83a873b
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu Jan  4 13:22:51 2024 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Jan  4 13:22:51 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aceaa84b

kde-frameworks/kirigami: Make drawer actions accessible

See also:
https://invent.kde.org/frameworks/kirigami/-/merge_requests/1200

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...irigami-5.113.0-drawer-actions-accessible.patch | 38 +++++++++++++++
 kde-frameworks/kirigami/kirigami-5.113.0-r1.ebuild | 54 ++++++++++++++++++++++
 2 files changed, 92 insertions(+)

diff --git 
a/kde-frameworks/kirigami/files/kirigami-5.113.0-drawer-actions-accessible.patch
 
b/kde-frameworks/kirigami/files/kirigami-5.113.0-drawer-actions-accessible.patch
new file mode 100644
index 000000000000..1a7dd0b98807
--- /dev/null
+++ 
b/kde-frameworks/kirigami/files/kirigami-5.113.0-drawer-actions-accessible.patch
@@ -0,0 +1,38 @@
+From 31f8fbc0d1c55e0d4af02be309aae5cef29055e7 Mon Sep 17 00:00:00 2001
+From: Volker Krause <[email protected]>
+Date: Mon, 14 Aug 2023 17:38:20 +0200
+Subject: [PATCH] Make drawer actions accessible
+
+They could previously not be triggered at all, and had no label in
+the global drawer.
+---
+ src/controls/private/ContextDrawerActionItem.qml | 2 ++
+ src/controls/private/GlobalDrawerActionItem.qml  | 3 +++
+ 2 files changed, 5 insertions(+)
+
+diff --git a/src/controls/private/ContextDrawerActionItem.qml 
b/src/controls/private/ContextDrawerActionItem.qml
+index 430ff87e6..f5b2ca5c7 100644
+--- a/src/controls/private/ContextDrawerActionItem.qml
++++ b/src/controls/private/ContextDrawerActionItem.qml
+@@ -95,4 +95,6 @@ Kirigami.BasicListItem {
+             console.warning("Don't know how to trigger the action")
+         }
+     }
++
++    Accessible.onPressAction: listItem.clicked()
+ }
+diff --git a/src/controls/private/GlobalDrawerActionItem.qml 
b/src/controls/private/GlobalDrawerActionItem.qml
+index 07e63fa38..6d3c5fe35 100644
+--- a/src/controls/private/GlobalDrawerActionItem.qml
++++ b/src/controls/private/GlobalDrawerActionItem.qml
+@@ -177,4 +177,7 @@ Kirigami.AbstractListItem {
+ 
+     Keys.onDownPressed: event => nextItemInFocusChain().focus = true
+     Keys.onUpPressed: event => nextItemInFocusChain(false).focus = true
++
++    Accessible.onPressAction: listItem.clicked()
++    Accessible.name: modelData.text
+ }
+-- 
+GitLab
+

diff --git a/kde-frameworks/kirigami/kirigami-5.113.0-r1.ebuild 
b/kde-frameworks/kirigami/kirigami-5.113.0-r1.ebuild
new file mode 100644
index 000000000000..5b726bad842f
--- /dev/null
+++ b/kde-frameworks/kirigami/kirigami-5.113.0-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_EXAMPLES="true"
+ECM_QTHELP="false"
+ECM_TEST="true"
+KDE_ORG_TAR_PN="${PN}2"
+QTMIN=5.15.9
+inherit ecm frameworks.kde.org toolchain-funcs
+
+DESCRIPTION="Lightweight user interface framework for mobile and convergent 
applications"
+HOMEPAGE="https://techbase.kde.org/Kirigami";
+
+LICENSE="LGPL-2+"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE="openmp"
+
+# requires package to already be installed
+RESTRICT="test"
+
+DEPEND="
+       >=dev-qt/qtconcurrent-${QTMIN}:5
+       >=dev-qt/qtdbus-${QTMIN}:5
+       >=dev-qt/qtdeclarative-${QTMIN}:5
+       >=dev-qt/qtgui-${QTMIN}:5
+       >=dev-qt/qtnetwork-${QTMIN}:5
+       >=dev-qt/qtquickcontrols2-${QTMIN}:5
+       >=dev-qt/qtsvg-${QTMIN}:5
+"
+RDEPEND="${DEPEND}
+       >=dev-qt/qtgraphicaleffects-${QTMIN}:5
+"
+BDEPEND=">=dev-qt/linguist-tools-${QTMIN}:5"
+
+PATCHES=( "${FILESDIR}/${P}-drawer-actions-accessible.patch" ) # kf5 branch
+
+pkg_pretend() {
+       [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+       [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DBUILD_EXAMPLES=$(usex examples)
+               $(cmake_use_find_package openmp OpenMP)
+       )
+
+       ecm_src_configure
+}

Reply via email to