summaryrefslogtreecommitdiff
path: root/dev-vcs/qgit/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-04-19 14:14:48 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-04-19 14:14:48 +0100
commit5cfef3c94cd7e82136c69a0322f5ba21f7e64632 (patch)
tree8f255dfacbacb657e3ac3654d01c1e11e651c066 /dev-vcs/qgit/files
parent8aebb228036d5e2863b7eaa6e319ab41c1669269 (diff)
gentoo resync : 19.04.2018
Diffstat (limited to 'dev-vcs/qgit/files')
-rw-r--r--dev-vcs/qgit/files/qgit-2.7-highdpi-support.patch51
-rw-r--r--dev-vcs/qgit/files/qgit-2.7-qt-5.11.patch24
2 files changed, 75 insertions, 0 deletions
diff --git a/dev-vcs/qgit/files/qgit-2.7-highdpi-support.patch b/dev-vcs/qgit/files/qgit-2.7-highdpi-support.patch
new file mode 100644
index 000000000000..17f940aa23b7
--- /dev/null
+++ b/dev-vcs/qgit/files/qgit-2.7-highdpi-support.patch
@@ -0,0 +1,51 @@
+From e60ae49271e06384163afa1ebd1e562eb7c520ed Mon Sep 17 00:00:00 2001
+From: David Edmundson <kde@davidedmundson.co.uk>
+Date: Thu, 15 Feb 2018 17:39:22 +0000
+Subject: [PATCH] Add high DPI support
+
+---
+ src/listview.cpp | 11 ++++++++++-
+ src/qgit.cpp | 5 ++++-
+ 2 files changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/src/listview.cpp b/src/listview.cpp
+index dd6a8cb..e4f094e 100644
+--- a/src/listview.cpp
++++ b/src/listview.cpp
+@@ -884,7 +884,16 @@ void ListViewDelegate::addTextPixmap(QPixmap** pp, SCRef txt, const QStyleOption
+ int pw = fm.boundingRect(txt).width() + 2 * spacing;
+ int ph = fm.height();
+
+- QPixmap* newPm = new QPixmap(ofs + pw, ph);
++ QSize pixmapSize(ofs + pw, ph);
++
++#if QT_VERSION >= QT_VERSION_CHECK(5,6,0)
++ qreal dpr = qApp->devicePixelRatio();
++ QPixmap* newPm = new QPixmap(pixmapSize * dpr);
++ newPm->setDevicePixelRatio(dpr);
++#else
++ QPixmap* newPm = new QPixmap(pixmapSize);
++#endif
++
+ QPainter p;
+ p.begin(newPm);
+ if (!pm->isNull()) {
+diff --git a/src/qgit.cpp b/src/qgit.cpp
+index 266a7b8..b01c49e 100644
+--- a/src/qgit.cpp
++++ b/src/qgit.cpp
+@@ -18,7 +18,10 @@ using namespace QGit;
+ int main(int argc, char* argv[]) {
+
+ QApplication app(argc, argv);
+- QCoreApplication::setOrganizationName(ORG_KEY);
++#if QT_VERSION >= QT_VERSION_CHECK(5,6,0)
++ app.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
++#endif
++ QCoreApplication::setOrganizationName(ORG_KEY);
+ QCoreApplication::setApplicationName(APP_KEY);
+
+ /* On Windows msysgit exec directory is set up
+--
+2.15.1
+
diff --git a/dev-vcs/qgit/files/qgit-2.7-qt-5.11.patch b/dev-vcs/qgit/files/qgit-2.7-qt-5.11.patch
new file mode 100644
index 000000000000..a92e1e50f726
--- /dev/null
+++ b/dev-vcs/qgit/files/qgit-2.7-qt-5.11.patch
@@ -0,0 +1,24 @@
+From 563bc3ab3f928a3ba1c22e5e62ab8cbe15c6bc15 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Tue, 17 Apr 2018 13:28:19 +0200
+Subject: [PATCH] Fix build with Qt 5.11 (missing header)
+
+---
+ src/patchview.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/patchview.cpp b/src/patchview.cpp
+index 5e3765d..afa796e 100644
+--- a/src/patchview.cpp
++++ b/src/patchview.cpp
+@@ -6,6 +6,7 @@
+ Copyright: See COPYING file that comes with this distribution
+
+ */
++#include <QButtonGroup>
+ #include <QScrollBar>
+ #include "common.h"
+ #include "git.h"
+--
+2.17.0
+