backported patch to fix selection rendering issues if rounding leads to left-out pixels
This commit is contained in:
parent
8ed6ce04af
commit
4a376dc703
|
@ -46,7 +46,7 @@ BuildRequires: pkgconfig(libsystemd)
|
||||||
Name: qt5-qtbase
|
Name: qt5-qtbase
|
||||||
Summary: Qt5 - QtBase components
|
Summary: Qt5 - QtBase components
|
||||||
Version: 5.11.2
|
Version: 5.11.2
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
|
|
||||||
# See LGPL_EXCEPTIONS.txt, for exception details
|
# See LGPL_EXCEPTIONS.txt, for exception details
|
||||||
License: LGPLv2 with exceptions or GPLv3 with exceptions
|
License: LGPLv2 with exceptions or GPLv3 with exceptions
|
||||||
|
@ -119,6 +119,7 @@ Patch68: qtbase-everywhere-src-5.11.1-python3.patch
|
||||||
Patch69: qt5-qtbase-glibc.patch
|
Patch69: qt5-qtbase-glibc.patch
|
||||||
|
|
||||||
## upstream patches
|
## upstream patches
|
||||||
|
Patch500: qtbase-everywhere-src-5.11.2-rendering-issue.patch
|
||||||
|
|
||||||
# Do not check any files in %%{_qt5_plugindir}/platformthemes/ for requires.
|
# Do not check any files in %%{_qt5_plugindir}/platformthemes/ for requires.
|
||||||
# Those themes are there for platform integration. If the required libraries are
|
# Those themes are there for platform integration. If the required libraries are
|
||||||
|
@ -376,6 +377,7 @@ Qt5 libraries used for drawing widgets and OpenGL items.
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
## upstream patches
|
## upstream patches
|
||||||
|
%patch500 -p1 -b .rendering-issue
|
||||||
|
|
||||||
# move some bundled libs to ensure they're not accidentally used
|
# move some bundled libs to ensure they're not accidentally used
|
||||||
pushd src/3rdparty
|
pushd src/3rdparty
|
||||||
|
@ -984,6 +986,9 @@ fi
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Oct 25 2018 Than Ngo <than@redhat.com> - 5.11.2-3
|
||||||
|
- backported patch to fix selection rendering issues if rounding leads to left-out pixels
|
||||||
|
|
||||||
* Thu Oct 11 2018 Rex Dieter <rdieter@fedoraproject.org> - 5.11.2-2
|
* Thu Oct 11 2018 Rex Dieter <rdieter@fedoraproject.org> - 5.11.2-2
|
||||||
- -no-use-gold-linker (#1635973)
|
- -no-use-gold-linker (#1635973)
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
diff -up qtbase-everywhere-src-5.11.2/src/gui/text/qtextlayout.cpp.me qtbase-everywhere-src-5.11.2/src/gui/text/qtextlayout.cpp
|
||||||
|
--- qtbase-everywhere-src-5.11.2/src/gui/text/qtextlayout.cpp.me 2018-10-25 10:54:48.849646288 +0200
|
||||||
|
+++ qtbase-everywhere-src-5.11.2/src/gui/text/qtextlayout.cpp 2018-10-25 10:58:19.054347658 +0200
|
||||||
|
@@ -1006,10 +1006,8 @@ static void addSelectedRegionsToPath(QTe
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lastSelectionWidth > 0) {
|
||||||
|
- QRectF rect = boundingRect & QRectF(lastSelectionX.toReal(), selectionY, lastSelectionWidth.toReal(), lineHeight);
|
||||||
|
- rect.moveLeft(qFloor(rect.left()));
|
||||||
|
- rect.moveTop(qFloor(rect.top()));
|
||||||
|
- region->addRect(rect);
|
||||||
|
+ const QRectF rect = boundingRect & QRectF(lastSelectionX.toReal(), selectionY, lastSelectionWidth.toReal(), lineHeight);
|
||||||
|
+ region->addRect(rect.toAlignedRect());
|
||||||
|
}
|
||||||
|
|
||||||
|
lastSelectionX = selectionX;
|
||||||
|
@@ -1017,10 +1015,8 @@ static void addSelectedRegionsToPath(QTe
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lastSelectionWidth > 0) {
|
||||||
|
- QRectF rect = boundingRect & QRectF(lastSelectionX.toReal(), selectionY, lastSelectionWidth.toReal(), lineHeight);
|
||||||
|
- rect.moveLeft(qFloor(rect.left()));
|
||||||
|
- rect.moveTop(qFloor(rect.top()));
|
||||||
|
- region->addRect(rect);
|
||||||
|
+ const QRectF rect = boundingRect & QRectF(lastSelectionX.toReal(), selectionY, lastSelectionWidth.toReal(), lineHeight);
|
||||||
|
+ region->addRect(rect.toAlignedRect());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -2135,7 +2131,7 @@ static void setPenAndDrawBackground(QPai
|
||||||
|
|
||||||
|
QBrush bg = chf.background();
|
||||||
|
if (bg.style() != Qt::NoBrush && !chf.property(SuppressBackground).toBool())
|
||||||
|
- p->fillRect(QRectF(qFloor(r.x()), qFloor(r.y()), r.width(), r.height()), bg);
|
||||||
|
+ p->fillRect(r.toAlignedRect(), bg);
|
||||||
|
if (c.style() != Qt::NoBrush) {
|
||||||
|
p->setPen(QPen(c, 0));
|
||||||
|
}
|
Loading…
Reference in New Issue