From 83bd9f759f9ee09939aa57308eee47d7e9dfe35c Mon Sep 17 00:00:00 2001 From: Jan-Marek Glogowski Date: Thu, 11 Jul 2019 02:30:51 +0000 Subject: Qt5 correctly draw rectangle frame This bug can be seen with the Writer comments "button" to hide or show comments, where qt5 misses the bottom and right borders. The drawRect from X11SalGraphicsImpl and SvpSalGraphics do this and it fixes the visual glitch. I'm not sure this is needed for drawAlphaRect, as other implementations don't handle drawing borders in these at all. Change-Id: Ic82d499cd8e1bb420a7df14269e86c75e0d30c0b Reviewed-on: https://gerrit.libreoffice.org/75416 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski --- vcl/qt5/Qt5Graphics_GDI.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vcl/qt5') diff --git a/vcl/qt5/Qt5Graphics_GDI.cxx b/vcl/qt5/Qt5Graphics_GDI.cxx index d5186f0d583b..f95f18af474c 100644 --- a/vcl/qt5/Qt5Graphics_GDI.cxx +++ b/vcl/qt5/Qt5Graphics_GDI.cxx @@ -210,7 +210,7 @@ void Qt5Graphics::drawRect(long nX, long nY, long nWidth, long nHeight) if (SALCOLOR_NONE != m_aFillColor) aPainter.fillRect(nX, nY, nWidth, nHeight, aPainter.brush()); if (SALCOLOR_NONE != m_aLineColor) - aPainter.drawRect(nX, nY, nWidth, nHeight); + aPainter.drawRect(nX, nY, nWidth - 1, nHeight - 1); aPainter.update(nX, nY, nWidth, nHeight); } @@ -624,7 +624,7 @@ bool Qt5Graphics::drawAlphaRect(long nX, long nY, long nWidth, long nHeight, if (SALCOLOR_NONE != m_aFillColor) aPainter.fillRect(nX, nY, nWidth, nHeight, aPainter.brush()); if (SALCOLOR_NONE != m_aLineColor) - aPainter.drawRect(nX, nY, nWidth, nHeight); + aPainter.drawRect(nX, nY, nWidth - 1, nHeight - 1); aPainter.update(nX, nY, nWidth, nHeight); return true; } -- cgit