diff --git a/Contributors.md b/Contributors.md index 009baa06..e443fd2d 100644 --- a/Contributors.md +++ b/Contributors.md @@ -27,6 +27,10 @@ author: Alan-CRL author: Alan-CRL +### Theme One Dark + +author: ÌìÒÀÀ¶(MZZW@github) + ## Color Schemes ### Monokai @@ -40,3 +44,7 @@ author: PerryDing ### Ochre_Butter author: PerryDing + +### One Dark + +author: ÌìÒÀÀ¶(MZZW@github) diff --git a/RedPandaIDE/editor.cpp b/RedPandaIDE/editor.cpp index 2727638a..dd23c4e1 100644 --- a/RedPandaIDE/editor.cpp +++ b/RedPandaIDE/editor.cpp @@ -1272,7 +1272,6 @@ void Editor::onPreparePaintHighlightToken(int line, int aChar, const QString &to } } } - //selection if (syntaxer() && attr) { if (attr->tokenType() == QSynedit::TokenType::Keyword) { diff --git a/libs/qsynedit/qsynedit/painter.cpp b/libs/qsynedit/qsynedit/painter.cpp index 6deb0492..5e5953cc 100644 --- a/libs/qsynedit/qsynedit/painter.cpp +++ b/libs/qsynedit/qsynedit/painter.cpp @@ -413,7 +413,6 @@ void QSynEditPainter::paintToken( mPainter->setFont(font); fontInited = true; } - //qDebug()<<"paint 1:"<drawText(nX,mRcToken.bottom()-mPainter->fontMetrics().descent() , textToPaint); drawed = true; } @@ -518,7 +517,6 @@ void QSynEditPainter::paintHighlightToken(const QString& lineText, bool isComplexToken; int nC1, nC2, nC1Sel, nC2Sel; bool bU1, bSel, bU2; - int nX1, nX2; // Compute some helper variables. nC1 = std::max(mLeft, mTokenAccu.left); nC2 = std::min(mRight, mTokenAccu.left + mTokenAccu.width); @@ -665,18 +663,17 @@ void QSynEditPainter::addHighlightToken( bool bCanAppend = false; bool bInitFont = (mTokenAccu.width==0); if (mTokenAccu.width > 0 ) { - if (showGlyphs == mTokenAccu.showSpecialGlyphs) { - // font style must be the same or token is only spaces - if (mTokenAccu.style != style) { - bInitFont = true; - } else { - if ( - // background color must be the same and - (mTokenAccu.background == background) && - // foreground color must be the same or token is only spaces - (mTokenAccu.foreground == foreground)) { - bCanAppend = true; - } + // font style must be the same or token is only spaces + if (mTokenAccu.style != style) { + bInitFont = true; + } else { + if ( + (showGlyphs == mTokenAccu.showSpecialGlyphs) && + // background color must be the same and + (mTokenAccu.background == background) && + // foreground color must be the same or token is only spaces + (mTokenAccu.foreground == foreground)) { + bCanAppend = true; } } // If we can't append it, then we have to paint the old token chars first. @@ -909,7 +906,6 @@ void QSynEditPainter::paintLines() mLineSelStart = 0; mLineSelEnd = 0; - bool selToEnd = false;; // Does the selection intersect the visible area? if (bAnySelection && (row >= mSelStart.row) && (row <= mSelEnd.row)) { // Default to a fully selected line. This is correct for the smLine @@ -937,8 +933,6 @@ void QSynEditPainter::paintLines() mLineSelEnd = xpos; mIsComplexLine = true; } - } else { - selToEnd = true; } } //endif bAnySelection