From 05b8b0e0af1d72e51a3ee61522941bf7605cd01c Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 4 Jul 2020 14:05:23 +0100 Subject: gentoo resync : 04.07.2020 --- kde-misc/Manifest.gz | Bin 5111 -> 5115 bytes kde-misc/kdiff3/Manifest | 2 + kde-misc/kdiff3/files/kdiff3-1.8.3-hidpi.patch | 112 +++++++++++++++++++++++++ kde-misc/kdiff3/kdiff3-1.8.3-r1.ebuild | 41 +++++++++ 4 files changed, 155 insertions(+) create mode 100644 kde-misc/kdiff3/files/kdiff3-1.8.3-hidpi.patch create mode 100644 kde-misc/kdiff3/kdiff3-1.8.3-r1.ebuild (limited to 'kde-misc') diff --git a/kde-misc/Manifest.gz b/kde-misc/Manifest.gz index d445444d9ebf..a93e634140a1 100644 Binary files a/kde-misc/Manifest.gz and b/kde-misc/Manifest.gz differ diff --git a/kde-misc/kdiff3/Manifest b/kde-misc/kdiff3/Manifest index 5f2b1ad0c58d..ac552de062dc 100644 --- a/kde-misc/kdiff3/Manifest +++ b/kde-misc/kdiff3/Manifest @@ -1,6 +1,8 @@ AUX kdiff3-1.8.2-crash-w-o-clipboard.patch 950 BLAKE2B a075e1e8a06958e5f849b024d65f7d709be49a7facda5b4bd2a223374735a80b19a94ee983c9d1245733fed6c46f6d4c70cf631d32c2c2aa5f345b999e437674 SHA512 43d0c4898841fb822571502257a0d7acd359deaa7e906a0a80fb9d2f9cb8b61008a6b96d08acf74d5a76534b519fc6f3435e08034651aa4572c637817be4e025 +AUX kdiff3-1.8.3-hidpi.patch 5069 BLAKE2B 3b62e3e06a5704e1bf2b49472ffa5b4bdcc985733cf0ea3ca77e62ffd90bb9a9c17a0997a81b91c376bcd9a967ffc3458a26951f4381e8d16d0330fa62bf3ff6 SHA512 207767a8375b3ccffdfb0c222992e2556e8fd1449b2bca8f6ec771d6c83bea296973b0c76085ec4b8333527c7c9f4ddb50f6dbb016206a3bf139232d21784389 DIST kdiff3-1.8.2.tar.xz 1039304 BLAKE2B de4052117bdade42fc489cf35ed9f4af4dfe8c1704dea36f2fa36ee8b14b4dd355052d0e9cdc0f32de9dde81e74862d1c10f7fcdde12db8f5e68d4e377e6f5f1 SHA512 c52dea38b8fa483344a840fb0f6eab04fdeb2dfc5f2a554f9fc095ed175c45f4c355fe7f04dceca4446ac483a1e97db2a296b947fb99315fc388a45e6298d7f0 DIST kdiff3-1.8.3.tar.xz 1038904 BLAKE2B 43fccb146a2220661d5f7e1e836de06b00afe54b9bccbd37b76eaf1dc660eb81dae781b08071f581c5a3bd123b7b829c4339b72348c65829c4f977a61771e69e SHA512 5cadd1cfe7e85a1dfb81c4f1cb685f988b0155b581ffa38653d4df30172b6a1ee4ed4269869285b5add3ca163eae88645d702e6fc84380229ac09ea14dd20a4d EBUILD kdiff3-1.8.2-r1.ebuild 1092 BLAKE2B 9e32869ac25e4341b2604e001a6e7079ea02487d5a5349756fb7931e1554327814a22295978448a0bc164abd56cbcfa0991d4886b5cded7c19a8d8880207d06c SHA512 624c8c8d282bdcf5d0797b795decc55fbe558a590e240586967f064623281444a8f722c1a0d66db8eca3de22a058288bd14601d686afec33068c20aa29399e15 +EBUILD kdiff3-1.8.3-r1.ebuild 1080 BLAKE2B cb676ecd233a5473b29354aea91f257858a2ac36b4df798357542f19793f5f9147f524a265f4ab822e64a12f0b047b971dae78bf1a486907d67b063dcbd2c1da SHA512 f79079f1ab3976b09cac4414cf4da5c2b57c48573fd025b15378cfa0a3269d78fc6a7269fa51d2a52d439e1d79366c2c51dcc1966252d1d7f9237076d0db1dcb EBUILD kdiff3-1.8.3.ebuild 1036 BLAKE2B 8c6d9b36f5eb10d6c2f5af8075ec1e4b08c28377b6c9e4cfab49ed2a4dcbc51a5ae40320e840559f897c4de0eb59b1b14458131c20296d71b3888ee5d43f6e07 SHA512 54a845c025f3c771e8d1eebec160d94dcc86c82958c0b5d9755ac5868d5f765ca94607178857d3a9dce88d121793e11ac46138e42d63e30372f81a3a6bd70962 MISC metadata.xml 362 BLAKE2B 45686f239bfb936fe11982d8bd2b51380cdfef94c11e5a6fb224c030154bda8b27190052b1705e010fd22305dd2830b8f8b385b47fc647f7c80b2ec01a1f579a SHA512 1fb8f10c3632c0007e65be57dbeb2492ad0e90a79f0403ce4a350a6ea0e1764dd1ee5038b0381049a6715bab2d7c38fc83c0b8f338ea7958bb34df499f355100 diff --git a/kde-misc/kdiff3/files/kdiff3-1.8.3-hidpi.patch b/kde-misc/kdiff3/files/kdiff3-1.8.3-hidpi.patch new file mode 100644 index 000000000000..180009afe0e7 --- /dev/null +++ b/kde-misc/kdiff3/files/kdiff3-1.8.3-hidpi.patch @@ -0,0 +1,112 @@ +From 5dcc0673c61cc75122bf5f812a45bbb15b778218 Mon Sep 17 00:00:00 2001 +From: Alexander Volkov +Date: Mon, 27 Apr 2020 15:52:18 +0300 +Subject: [PATCH] Add HiDPI support + +* Backported to 1.8 branch +--- + src/Overview.cpp | 6 ++++-- + src/directorymergewindow.cpp | 15 +++++++++------ + src/main.cpp | 1 + + src/mergeresultwindow.cpp | 7 +++++-- + 4 files changed, 19 insertions(+), 10 deletions(-) + +diff --git a/src/Overview.cpp b/src/Overview.cpp +index ee1d73f..ac35e7e 100644 +--- a/src/Overview.cpp ++++ b/src/Overview.cpp +@@ -271,7 +271,8 @@ void Overview::paintEvent(QPaintEvent*) + int h = height() - 1; + int w = width(); + +- if(m_pixmap.size() != size()) ++ const auto dpr = devicePixelRatioF(); ++ if(m_pixmap.size() != size() * dpr) + { + if(m_pOptions->m_bWordWrap) + { +@@ -287,7 +288,8 @@ void Overview::paintEvent(QPaintEvent*) + m_nofLines = m_pDiff3LineList->size(); + } + +- m_pixmap = QPixmap(size()); ++ m_pixmap = QPixmap(size() * dpr); ++ m_pixmap.setDevicePixelRatio(dpr); + + QPainter p(&m_pixmap); + p.fillRect(rect(), m_pOptions->m_bgColor); +diff --git a/src/directorymergewindow.cpp b/src/directorymergewindow.cpp +index 31dbcaf..1cc62b4 100644 +--- a/src/directorymergewindow.cpp ++++ b/src/directorymergewindow.cpp +@@ -584,7 +584,10 @@ class DirectoryMergeWindow::DirMergeItemDelegate : public QStyledItemDelegate + //QPixmap icon = value.value(); //pixmap(column); + if(!icon.isNull()) + { +- int yOffset = (sizeHint(option, index).height() - icon.height()) / 2; ++ const auto dpr = thePainter->device()->devicePixelRatioF(); ++ const int w = qRound(icon.width() / dpr); ++ const int h = qRound(icon.height() / dpr); ++ int yOffset = (sizeHint(option, index).height() - h) / 2; + thePainter->drawPixmap(x + 2, y + yOffset, icon); + + int i = index == d->m_selection1Index ? 1 : index == d->m_selection2Index ? 2 : index == d->m_selection3Index ? 3 : 0; +@@ -593,20 +596,20 @@ class DirectoryMergeWindow::DirMergeItemDelegate : public QStyledItemDelegate + Options* pOpts = d->m_pOptions; + QColor c(i == 1 ? pOpts->m_colorA : i == 2 ? pOpts->m_colorB : pOpts->m_colorC); + thePainter->setPen(c); // highlight() ); +- thePainter->drawRect(x + 2, y + yOffset, icon.width(), icon.height()); ++ thePainter->drawRect(x + 2, y + yOffset, w, h); + thePainter->setPen(QPen(c, 0, Qt::DotLine)); +- thePainter->drawRect(x + 1, y + yOffset - 1, icon.width() + 2, icon.height() + 2); ++ thePainter->drawRect(x + 1, y + yOffset - 1, w + 2, h + 2); + thePainter->setPen(Qt::white); + QString s(QChar('A' + i - 1)); + +- thePainter->drawText(x + 2 + (icon.width() - Utils::getHorizontalAdvance(thePainter->fontMetrics(), s)) / 2, +- y + yOffset + (icon.height() + thePainter->fontMetrics().ascent()) / 2 - 1, ++ thePainter->drawText(x + 2 + (w - Utils::getHorizontalAdvance(thePainter->fontMetrics(), s)) / 2, ++ y + yOffset + (h + thePainter->fontMetrics().ascent()) / 2 - 1, + s); + } + else + { + thePainter->setPen(m_pDMW->palette().window().color()); +- thePainter->drawRect(x + 1, y + yOffset - 1, icon.width() + 2, icon.height() + 2); ++ thePainter->drawRect(x + 1, y + yOffset - 1, w + 2, h + 2); + } + return; + } +diff --git a/src/main.cpp b/src/main.cpp +index df06eab..c62aee3 100644 +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -81,6 +81,7 @@ int main(int argc, char* argv[]) + { + const QLatin1String appName("kdiff3"); + ++ QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); + QApplication app(argc, argv); // KAboutData and QCommandLineParser depend on this being setup. + KLocalizedString::setApplicationDomain(appName.data()); + +diff --git a/src/mergeresultwindow.cpp b/src/mergeresultwindow.cpp +index 894bc44..29d16ae 100644 +--- a/src/mergeresultwindow.cpp ++++ b/src/mergeresultwindow.cpp +@@ -1970,8 +1970,11 @@ void MergeResultWindow::paintEvent(QPaintEvent*) + if(!m_bCursorUpdate) // Don't redraw everything for blinking cursor? + { + m_selection.bSelectionContainsData = false; +- if(size() != m_pixmap.size()) +- m_pixmap = QPixmap(size()); ++ const auto dpr = devicePixelRatioF(); ++ if(size() * dpr != m_pixmap.size()) { ++ m_pixmap = QPixmap(size() * dpr); ++ m_pixmap.setDevicePixelRatio(dpr); ++ } + + RLPainter p(&m_pixmap, m_pOptions->m_bRightToLeftLanguage, width(), fontWidth); + p.setFont(font()); +-- +2.27.0 + diff --git a/kde-misc/kdiff3/kdiff3-1.8.3-r1.ebuild b/kde-misc/kdiff3/kdiff3-1.8.3-r1.ebuild new file mode 100644 index 000000000000..9611b4dd9139 --- /dev/null +++ b/kde-misc/kdiff3/kdiff3-1.8.3-r1.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +ECM_HANDBOOK="forceoptional" +KFMIN=5.60.0 +QTMIN=5.12.3 +inherit ecm kde.org + +DESCRIPTION="Frontend to diff3 based on KDE Frameworks" +HOMEPAGE="https://kde.org/applications/development/org.kde.kdiff3 +https://userbase.kde.org/KDiff3" +SRC_URI="mirror://kde/stable/${PN}/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="5" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" +IUSE="" + +DEPEND=" + >=dev-qt/qtgui-${QTMIN}:5 + >=dev-qt/qtprintsupport-${QTMIN}:5 + >=dev-qt/qtwidgets-${QTMIN}:5 + >=kde-frameworks/kconfig-${KFMIN}:5 + >=kde-frameworks/kconfigwidgets-${KFMIN}:5 + >=kde-frameworks/kcoreaddons-${KFMIN}:5 + >=kde-frameworks/kcrash-${KFMIN}:5 + >=kde-frameworks/ki18n-${KFMIN}:5 + >=kde-frameworks/kiconthemes-${KFMIN}:5 + >=kde-frameworks/kio-${KFMIN}:5 + >=kde-frameworks/kparts-${KFMIN}:5 + >=kde-frameworks/ktextwidgets-${KFMIN}:5 + >=kde-frameworks/kwidgetsaddons-${KFMIN}:5 + >=kde-frameworks/kxmlgui-${KFMIN}:5 +" +RDEPEND="${DEPEND} + sys-apps/diffutils +" + +PATCHES=( "${FILESDIR}/${P}-hidpi.patch" ) -- cgit v1.2.3