diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2019-07-11 02:30:51 +0000 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2019-07-11 17:26:55 +0200 |
commit | 83bd9f759f9ee09939aa57308eee47d7e9dfe35c (patch) | |
tree | 0094f8a818d0ba2aa8855ddd9c753876b44a56c5 /vcl/qt5 | |
parent | 2060f9598bc4480c44465abc9250b595c09af188 (diff) |
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 <glogow@fbihome.de>
Diffstat (limited to 'vcl/qt5')
-rw-r--r-- | vcl/qt5/Qt5Graphics_GDI.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |