> On Oct 22, 2015, at 3:17 AM,
in...@xavierriley.co.uk wrote:
>
> This looks very promising! Just having the background be translucent would be a great start for us, especially if it's not too difficult to implement.
>
>> I tested it with the built-in Qt port and got it to work by just disabling drawing of the background.
>
> Just so I know, does "the built-in Qt port" refer to the qt/ folder in the Scintilla source? (as opposed to the QScintilla project)
Yes.
> Also, "disabling drawing of the background" - could you point me at where this is handled? I've looked in the qt/ folder and the ScintillaBase.cxx file and I can't see where to make the change.
The changes I made for testing are inline below. Neil, disabling autoFillBackground on the viewport is probably good in any case.
Jason
diff -r 29b245e02df8 qt/ScintillaEditBase/ScintillaEditBase.cpp
--- a/qt/ScintillaEditBase/ScintillaEditBase.cpp Mon Oct 19 21:52:08 2015 +1100
+++ b/qt/ScintillaEditBase/ScintillaEditBase.cpp Thu Oct 22 09:36:03 2015 -0600
@@ -47,7 +47,8 @@
setFrameStyle(QFrame::NoFrame);
setFocusPolicy(Qt::StrongFocus);
setAttribute(Qt::WA_StaticContents);
- viewport()->setAttribute(Qt::WA_OpaquePaintEvent);
+ viewport()->setAutoFillBackground(false);
+ //viewport()->setAttribute(Qt::WA_OpaquePaintEvent);
setAttribute(Qt::WA_KeyCompression);
setAttribute(Qt::WA_InputMethodEnabled);
diff -r 29b245e02df8 src/EditView.cxx
--- a/src/EditView.cxx Mon Oct 19 21:52:08 2015 +1100
+++ b/src/EditView.cxx Thu Oct 22 09:36:03 2015 -0600
@@ -1697,12 +1697,14 @@
xStart += static_cast<int>(ll->wrapIndent);
}
+#if 0
if ((phasesDraw != phasesOne) && (phase & drawBack)) {
DrawBackground(surface, model, vsDraw, ll, rcLine, lineRange, posLineStart, xStart,
subLine, background);
DrawEOL(surface, model, vsDraw, ll, rcLine, line, lineRange.end,
xStart, subLine, subLineStart, background);
}
+#endif
if (phase & drawIndicatorsBack) {
DrawIndicators(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, lineRange.end, true, model.hoverIndicatorPos);