diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2019-05-18 14:21:11 +0200 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2019-05-18 18:34:54 +0200 |
commit | 1886f66ac346be66b20ecd48c6de914a8de6ec0b (patch) | |
tree | a50c654b9e085a8043c98377d73f2b9a7c9743ec /kde-plasma/xdg-desktop-portal-kde | |
parent | dev-scheme/racket: version bump 7.3 (diff) | |
download | gentoo-1886f66ac346be66b20ecd48c6de914a8de6ec0b.tar.gz gentoo-1886f66ac346be66b20ecd48c6de914a8de6ec0b.tar.bz2 gentoo-1886f66ac346be66b20ecd48c6de914a8de6ec0b.zip |
kde-plasma/xdg-desktop-portal-kde: Use QScrollArea for AppChooser
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=407559
Upstream commit 83773f6682154723d2a68e731c0e87c1f1a06893
Package-Manager: Portage-2.3.66, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-plasma/xdg-desktop-portal-kde')
-rw-r--r-- | kde-plasma/xdg-desktop-portal-kde/files/xdg-desktop-portal-kde-5.15.5-appchooser.patch | 73 | ||||
-rw-r--r-- | kde-plasma/xdg-desktop-portal-kde/xdg-desktop-portal-kde-5.15.5-r1.ebuild | 38 |
2 files changed, 111 insertions, 0 deletions
diff --git a/kde-plasma/xdg-desktop-portal-kde/files/xdg-desktop-portal-kde-5.15.5-appchooser.patch b/kde-plasma/xdg-desktop-portal-kde/files/xdg-desktop-portal-kde-5.15.5-appchooser.patch new file mode 100644 index 000000000000..3a95c0272e81 --- /dev/null +++ b/kde-plasma/xdg-desktop-portal-kde/files/xdg-desktop-portal-kde-5.15.5-appchooser.patch @@ -0,0 +1,73 @@ +From 83773f6682154723d2a68e731c0e87c1f1a06893 Mon Sep 17 00:00:00 2001 +From: Jan Grulich <jgrulich@redhat.com> +Date: Thu, 16 May 2019 13:05:19 +0200 +Subject: AppChooser: put list of applications into a scrollarea + +BUG:407559 +FIXED-IN: 5.15.6 +--- + src/appchooserdialog.cpp | 18 ++++++++++++++++-- + src/appchooserdialogitem.cpp | 1 + + 2 files changed, 17 insertions(+), 2 deletions(-) + +diff --git a/src/appchooserdialog.cpp b/src/appchooserdialog.cpp +index 8fc888f..b14a5f9 100644 +--- a/src/appchooserdialog.cpp ++++ b/src/appchooserdialog.cpp +@@ -30,6 +30,7 @@ + #include <KLocalizedString> + #include <QSettings> + #include <QStandardPaths> ++#include <QScrollArea> + #include <QTimer> + + #include <KProcess> +@@ -42,6 +43,7 @@ AppChooserDialog::AppChooserDialog(const QStringList &choices, const QString &de + , m_defaultApp(defaultApp) + { + setMinimumWidth(640); ++ setMaximumHeight(480); + + QVBoxLayout *vboxLayout = new QVBoxLayout(this); + vboxLayout->setSpacing(20); +@@ -60,11 +62,23 @@ AppChooserDialog::AppChooserDialog(const QStringList &choices, const QString &de + + vboxLayout->addWidget(label); + +- m_gridLayout = new QGridLayout(); ++ QWidget *appsWidget = new QWidget(this); ++ QScrollArea *scrollArea = new QScrollArea(this); ++ scrollArea->setFrameShape(QFrame::NoFrame); ++ scrollArea->setWidget(appsWidget); ++ scrollArea->setWidgetResizable(true); ++ ++ // FIXME: workaround scrollarea sizing, set minimum height to make sure at least two rows are visible ++ if (choices.count() > 3) { ++ scrollArea->setMinimumHeight(200); ++ } ++ ++ m_gridLayout = new QGridLayout; ++ appsWidget->setLayout(m_gridLayout); + + QTimer::singleShot(0, this, &AppChooserDialog::addDialogItems); + +- vboxLayout->addLayout(m_gridLayout); ++ vboxLayout->addWidget(scrollArea); + + setLayout(vboxLayout); + setWindowTitle(i18n("Open with")); +diff --git a/src/appchooserdialogitem.cpp b/src/appchooserdialogitem.cpp +index d01327f..1ce3249 100644 +--- a/src/appchooserdialogitem.cpp ++++ b/src/appchooserdialogitem.cpp +@@ -36,6 +36,7 @@ AppChooserDialogItem::AppChooserDialogItem(const QString &applicationName, const + setIcon(QIcon::fromTheme(icon)); + setIconSize(QSize(64, 64)); + setCheckable(true); ++ setFixedHeight(100); + setFixedWidth(150); + setToolButtonStyle(Qt::ToolButtonTextUnderIcon); + +-- +cgit v1.1 + diff --git a/kde-plasma/xdg-desktop-portal-kde/xdg-desktop-portal-kde-5.15.5-r1.ebuild b/kde-plasma/xdg-desktop-portal-kde/xdg-desktop-portal-kde-5.15.5-r1.ebuild new file mode 100644 index 000000000000..2bede4d8f546 --- /dev/null +++ b/kde-plasma/xdg-desktop-portal-kde/xdg-desktop-portal-kde-5.15.5-r1.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +VIRTUALX_REQUIRED="test" +inherit kde5 + +DESCRIPTION="Backend implementation for xdg-desktop-portal that is using Qt/KDE Frameworks" +LICENSE="LGPL-2+" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" +IUSE="" + +# TODO: Needed for screencast portal +# dev-libs/glib:2 +# media-libs/libepoxy +# media-libs/mesa[gbm] +# not packaged: PipeWire +COMMON_DEPEND=" + $(add_frameworks_dep kcoreaddons) + $(add_frameworks_dep ki18n) + $(add_frameworks_dep kio) + $(add_frameworks_dep knotifications) + $(add_frameworks_dep kwidgetsaddons) + $(add_qt_dep qtdbus) + $(add_qt_dep qtgui) + $(add_qt_dep qtprintsupport 'cups') + $(add_qt_dep qtwidgets) +" +DEPEND="${COMMON_DEPEND} + $(add_frameworks_dep kwayland) + $(add_qt_dep qtconcurrent) +" +RDEPEND="${COMMON_DEPEND} + sys-apps/xdg-desktop-portal +" + +PATCHES=( "${FILESDIR}/${P}-appchooser.patch" ) |