public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-plasma/xdg-desktop-portal-kde/files/, kde-plasma/xdg-desktop-portal-kde/
Date: Sat, 18 May 2019 16:35:15 +0000 (UTC)	[thread overview]
Message-ID: <1558197294.1886f66ac346be66b20ecd48c6de914a8de6ec0b.asturm@gentoo> (raw)

commit:     1886f66ac346be66b20ecd48c6de914a8de6ec0b
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat May 18 12:21:11 2019 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat May 18 16:34:54 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1886f66a

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 <AT> gentoo.org>

 .../xdg-desktop-portal-kde-5.15.5-appchooser.patch | 73 ++++++++++++++++++++++
 .../xdg-desktop-portal-kde-5.15.5-r1.ebuild        | 38 +++++++++++
 2 files changed, 111 insertions(+)

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 00000000000..3a95c0272e8
--- /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 00000000000..2bede4d8f54
--- /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" )


             reply	other threads:[~2019-05-18 16:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-18 16:35 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-05-17 19:02 [gentoo-commits] repo/gentoo:master commit in: kde-plasma/xdg-desktop-portal-kde/files/, kde-plasma/xdg-desktop-portal-kde/ Andreas Sturmlechner
2022-05-30 16:09 Andreas Sturmlechner
2023-05-22 12:55 Andreas Sturmlechner
2023-10-03 15:29 Sam James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1558197294.1886f66ac346be66b20ecd48c6de914a8de6ec0b.asturm@gentoo \
    --to=asturm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox