summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2018-12-18 10:28:53 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-12-20 14:09:10 +0100
commitf5d7049f4eb39967625bac819e17170485ea6698 (patch)
tree70524cc3e6b857a5c09cd440ca37bdeb3ed6fa24
parentd58d92d72b00f45c56a3b0fe55ca9fd837d244a9 (diff)
Qt5 fix SalGraphics::invert
... and also print the invert mode name into the inverted region when running "./bin/run vcldemo --show ellipse". Conflicts: vcl/workben/vcldemo.cxx Change-Id: Id461a32756583df1ef778320c29c45c0e7e4fbc8 Reviewed-on: https://gerrit.libreoffice.org/65326 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 6251e4080f4c1ed3bf1a5d615fc3ebdda4c87059) Reviewed-on: https://gerrit.libreoffice.org/65474 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/qt5/Qt5Graphics_GDI.cxx8
-rw-r--r--vcl/workben/vcldemo.cxx4
2 files changed, 9 insertions, 3 deletions
diff --git a/vcl/qt5/Qt5Graphics_GDI.cxx b/vcl/qt5/Qt5Graphics_GDI.cxx
index fb766205f654..156c487ad57d 100644
--- a/vcl/qt5/Qt5Graphics_GDI.cxx
+++ b/vcl/qt5/Qt5Graphics_GDI.cxx
@@ -485,15 +485,17 @@ void Qt5Graphics::invert(long nX, long nY, long nWidth, long nHeight, SalInvert
if (SalInvert::N50 & nFlags)
{
aPainter.setCompositionMode(QPainter::RasterOp_SourceXorDestination);
- aPainter.setBrush(Qt::DiagCrossPattern);
- aPainter.fillRect(nX, nY, nWidth, nHeight, aPainter.brush());
+ QBrush aBrush(Qt::white, Qt::Dense4Pattern);
+ aPainter.fillRect(nX, nY, nWidth, nHeight, aBrush);
}
else
{
if (SalInvert::TrackFrame & nFlags)
{
aPainter.setCompositionMode(QPainter::RasterOp_SourceXorDestination);
- aPainter.setPen(Qt::DashLine);
+ QPen aPen(Qt::white);
+ aPen.setStyle(Qt::DotLine);
+ aPainter.setPen(aPen);
aPainter.drawRect(nX, nY, nWidth, nHeight);
}
else
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 59d121b70c28..520ef3e66138 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -766,9 +766,13 @@ public:
{
auto aRegions = partition(rCtx, 2, 2);
doInvert(rDev, aRegions[0], InvertFlags::NONE);
+ rDev.DrawText(aRegions[0], "InvertFlags::NONE");
doInvert(rDev, aRegions[1], InvertFlags::N50);
+ rDev.DrawText(aRegions[1], "InvertFlags::N50");
doInvert(rDev, aRegions[2], InvertFlags::Highlight);
+ rDev.DrawText(aRegions[2], "InvertFlags::Highlight");
doInvert(rDev, aRegions[3], InvertFlags::TrackFrame);
+ rDev.DrawText(aRegions[3], "InvertFlags::TrackFrame");
}
}
};