diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-07-19 22:05:27 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-07-19 22:05:27 +0100 |
commit | 121ed4eec41fbf03e1998d09eede1bf449da63b9 (patch) | |
tree | ce9341d77d1507f67d4a3a1472da9011b5baa0a8 /kde-misc/skanlite | |
parent | dd762ff83c330186ee2ede002e08b2f780cddd51 (diff) |
gentoo resync : 19.07.2019
Diffstat (limited to 'kde-misc/skanlite')
-rw-r--r-- | kde-misc/skanlite/Manifest | 2 | ||||
-rw-r--r-- | kde-misc/skanlite/files/skanlite-2.1.0.1-hidpi.patch | 67 | ||||
-rw-r--r-- | kde-misc/skanlite/skanlite-2.1.0.1-r1.ebuild | 37 |
3 files changed, 106 insertions, 0 deletions
diff --git a/kde-misc/skanlite/Manifest b/kde-misc/skanlite/Manifest index b6a144990acd..35dea3971e8d 100644 --- a/kde-misc/skanlite/Manifest +++ b/kde-misc/skanlite/Manifest @@ -1,4 +1,6 @@ AUX skanlite-2.1.0.1-cmake.patch 2978 BLAKE2B 68d39415f4199b018028b16727f734117a7499be83904e80b9aeb2837a835141363516e0b452d81ddaab8b874de75e869168c9215babb3230c9a02a33b7f33e7 SHA512 7a7ee0f6b7b82a2b8e90ac58d632c92eb7c0992195f104ed794d14c451a21fefb7a3621bc22c14948b83b8e9aa86d9868ebd97d780a8d31f01186485d507d3ce +AUX skanlite-2.1.0.1-hidpi.patch 2234 BLAKE2B c2867f5d6251b2258097e1682e2cc8a8263631000f32701802940d84d63e657d12a45b326932d3bb087c571928b08529d2e050cf5298addcb9749d38337a3635 SHA512 d5c559a8d057acce73db1252d52299a72788554845dd0a00fb000c15b7d0a4ba8d20f72a24dddd032c2cb8cf84ff6bef9b2d365cbb70e98f7003523d479e9e92 DIST skanlite-2.1.0.1.tar.xz 2151312 BLAKE2B c03ace256fd4159e36c7eb871f4f88a11142e36e427120560a09a0d0516f91450d350d4ae5db2004da6493d3a2a0aaaf5d45b4a688f3943cf92b76a71fb5f937 SHA512 8eb1a32994259010d4a134c1b25b74b8cc03ba4fa6ce70ee2026a3070c675c2b11f38770453d197008fbe12df976cc653362eb44d6ef89a7f0173c3a2cef3658 +EBUILD skanlite-2.1.0.1-r1.ebuild 890 BLAKE2B 288bed43e44d077c03811848d6005ab455336dfbb1558e281f3f58b35383f445b097faa65295bb64e65d9ab198dfa350818a5440da50176aefeebc68dd7644b2 SHA512 8743d3eff3e18bf17a0157c6414308540f81e248bc3dffa437a3439894795be2883b3ac6a41f30da7e3f86b53cdc967664eb230aac5ecbed254cbac99dba886c EBUILD skanlite-2.1.0.1.ebuild 885 BLAKE2B 98420a2dc02261ad4480f6e87b65fccbb227f6f6c2ddfdbd6462041a2ef03258cd444c9fd88e47add8e64368a4c7d439fd92b222cd77cd4f0c949e20d8057d19 SHA512 9c03dd4f8ae6190bb7274dbc3a625b71a3743a62ce93fa607647b213bf24153cc46cf8cd50fc5dbf29699a6a9557a52f7fb19ecc47450bcbb129c503ed93605f MISC metadata.xml 249 BLAKE2B ad415db89e5dee1627aa77f44ded9d4e1e5b8217d06c7ca25bbaa3fe92ce67c2b1090957c45a821b407d7927e5af798498aa6a5b903895ee1af8ee20a446c7f7 SHA512 76a5a340b13f0053ca3c5e94ed24380ea8d29b45ac8655419e22eaadb1e4a827c04d2e7e36b65145c4964e6526f656618fc6ac144e277ef53cb7373e6239e3c3 diff --git a/kde-misc/skanlite/files/skanlite-2.1.0.1-hidpi.patch b/kde-misc/skanlite/files/skanlite-2.1.0.1-hidpi.patch new file mode 100644 index 000000000000..563f5950063a --- /dev/null +++ b/kde-misc/skanlite/files/skanlite-2.1.0.1-hidpi.patch @@ -0,0 +1,67 @@ +From cb382f87d63bdc3736696ee289875bde2ecee9e5 Mon Sep 17 00:00:00 2001 +From: Alexander Volkov <a.volkov@rusbitech.ru> +Date: Thu, 25 Apr 2019 18:09:59 +0300 +Subject: Add HiDPI support + +Reviewers: sars, davidedmundson, ngraham + +Reviewed By: sars + +Differential Revision: https://phabricator.kde.org/D20821 +--- + src/ImageViewer.cpp | 14 +++++++++++--- + src/main.cpp | 1 + + 2 files changed, 12 insertions(+), 3 deletions(-) + +diff --git a/src/ImageViewer.cpp b/src/ImageViewer.cpp +index 09f9b3d..5cf1439 100644 +--- a/src/ImageViewer.cpp ++++ b/src/ImageViewer.cpp +@@ -87,14 +87,19 @@ void ImageViewer::setQImage(QImage *img) + } + + d->img = img; +- d->scene->setSceneRect(0, 0, img->width(), img->height()); ++ const auto dpr = devicePixelRatioF(); ++ d->img->setDevicePixelRatio(dpr); ++ d->scene->setSceneRect(0, 0, img->width() / dpr, img->height() / dpr); + } + + // ------------------------------------------------------------------------ + void ImageViewer::drawBackground(QPainter *painter, const QRectF &rect) + { + painter->fillRect(rect, QColor(0x70, 0x70, 0x70)); +- painter->drawImage(rect, *d->img, rect); ++ QRectF r = rect & sceneRect(); ++ const auto dpr = d->img->devicePixelRatio(); ++ QRectF srcRect = QRectF(r.topLeft() * dpr, r.size() * dpr); ++ painter->drawImage(r, *d->img, srcRect); + } + + // ------------------------------------------------------------------------ +@@ -118,7 +123,10 @@ void ImageViewer::zoomActualSize() + // ------------------------------------------------------------------------ + void ImageViewer::zoom2Fit() + { +- fitInView(d->img->rect(), Qt::KeepAspectRatio); ++ QRectF r = d->img->rect(); ++ const auto dpr = d->img->devicePixelRatio(); ++ r = QRectF(r.topLeft() / dpr, r.size() / dpr); ++ fitInView(r, Qt::KeepAspectRatio); + } + + // ------------------------------------------------------------------------ +diff --git a/src/main.cpp b/src/main.cpp +index aa704be..ae0d9b6 100644 +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -34,6 +34,7 @@ + + int main(int argc, char *argv[]) + { ++ QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); + QApplication app(argc, argv); + + Kdelibs4ConfigMigrator migrate(QLatin1String("Skanlite")); +-- +cgit v1.1 diff --git a/kde-misc/skanlite/skanlite-2.1.0.1-r1.ebuild b/kde-misc/skanlite/skanlite-2.1.0.1-r1.ebuild new file mode 100644 index 000000000000..dec84c60dfe1 --- /dev/null +++ b/kde-misc/skanlite/skanlite-2.1.0.1-r1.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +KDE_HANDBOOK="forceoptional" +KDE_TEST="forceoptional" +inherit kde5 + +DESCRIPTION="KDE image scanning application" +HOMEPAGE="https://kde.org/applications/graphics/skanlite" +SRC_URI="mirror://kde/stable/${PN}/2.1/${P}.tar.xz" + +LICENSE="|| ( GPL-2 GPL-3 ) handbook? ( FDL-1.2+ )" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND=" + $(add_frameworks_dep kconfig) + $(add_frameworks_dep kconfigwidgets) + $(add_frameworks_dep kcoreaddons) + $(add_frameworks_dep ki18n) + $(add_frameworks_dep kio) + $(add_frameworks_dep kjobwidgets) + $(add_frameworks_dep kwidgetsaddons) + $(add_frameworks_dep kxmlgui) + $(add_kdeapps_dep libksane) + $(add_qt_dep qtgui) + $(add_qt_dep qtwidgets) + media-libs/libpng:0= +" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}/${P}-cmake.patch" + "${FILESDIR}/${P}-hidpi.patch" +) |