aboutsummaryrefslogtreecommitdiffhomepage
path: root/qt/ScintillaEditBase
diff options
context:
space:
mode:
Diffstat (limited to 'qt/ScintillaEditBase')
-rw-r--r--qt/ScintillaEditBase/PlatQt.cpp8
-rw-r--r--qt/ScintillaEditBase/PlatQt.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/qt/ScintillaEditBase/PlatQt.cpp b/qt/ScintillaEditBase/PlatQt.cpp
index 6c7f789ce..fa4c062d8 100644
--- a/qt/ScintillaEditBase/PlatQt.cpp
+++ b/qt/ScintillaEditBase/PlatQt.cpp
@@ -346,6 +346,14 @@ void SurfaceImpl::RectangleDraw(PRectangle rc, FillStroke fillStroke)
GetPainter()->drawRect(rect);
}
+void SurfaceImpl::RectangleFrame(PRectangle rc, Stroke stroke) {
+ PenColourWidth(stroke.colour, stroke.width);
+ // Default QBrush is Qt::NoBrush so does not fill
+ GetPainter()->setBrush(QBrush());
+ const QRectF rect = QRectFFromPRect(rc.Inset(stroke.width / 2));
+ GetPainter()->drawRect(rect);
+}
+
void SurfaceImpl::FillRectangle(PRectangle rc, ColourDesired back)
{
GetPainter()->fillRect(QRectFFromPRect(rc), QColorFromCA(back));
diff --git a/qt/ScintillaEditBase/PlatQt.h b/qt/ScintillaEditBase/PlatQt.h
index 12f3e7726..2ca31da2d 100644
--- a/qt/ScintillaEditBase/PlatQt.h
+++ b/qt/ScintillaEditBase/PlatQt.h
@@ -110,6 +110,7 @@ public:
void RectangleDraw(PRectangle rc, ColourDesired fore,
ColourDesired back) override;
void RectangleDraw(PRectangle rc, FillStroke fillStroke) override;
+ void RectangleFrame(PRectangle rc, Stroke stroke) override;
void FillRectangle(PRectangle rc, ColourDesired back) override;
void FillRectangle(PRectangle rc, Fill fill) override;
void FillRectangle(PRectangle rc, Surface &surfacePattern) override;