aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--qt/ScintillaEditBase/PlatQt.cpp2
-rw-r--r--qt/ScintillaEditBase/PlatQt.h4
2 files changed, 5 insertions, 1 deletions
diff --git a/qt/ScintillaEditBase/PlatQt.cpp b/qt/ScintillaEditBase/PlatQt.cpp
index 93dcacaf0..c91bfc89e 100644
--- a/qt/ScintillaEditBase/PlatQt.cpp
+++ b/qt/ScintillaEditBase/PlatQt.cpp
@@ -339,7 +339,7 @@ void SurfaceImpl::RoundedRectangle(PRectangle rc,
{
PenColour(fore);
BrushColour(back);
- GetPainter()->drawRoundRect(QRectFFromPRect(rc));
+ GetPainter()->drawRoundedRect(QRectFFromPRect(RectangleInset(rc, 0.5f)), 3.0f, 3.0f);
}
void SurfaceImpl::AlphaRectangle(PRectangle rc,
diff --git a/qt/ScintillaEditBase/PlatQt.h b/qt/ScintillaEditBase/PlatQt.h
index 671f3f196..054f55bd3 100644
--- a/qt/ScintillaEditBase/PlatQt.h
+++ b/qt/ScintillaEditBase/PlatQt.h
@@ -59,6 +59,10 @@ inline Point PointFromQPoint(QPoint qp)
return Point(qp.x(), qp.y());
}
+constexpr PRectangle RectangleInset(PRectangle rc, XYPOSITION delta) noexcept {
+ return PRectangle(rc.left + delta, rc.top + delta, rc.right - delta, rc.bottom - delta);
+}
+
class SurfaceImpl : public Surface {
private:
QPaintDevice *device;