- fix: Font style not applied when option "show spaces" is on.
Update Contributor info
This commit is contained in:
parent
af11c6df32
commit
026a787ee5
|
@ -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)
|
||||
|
|
|
@ -1272,7 +1272,6 @@ void Editor::onPreparePaintHighlightToken(int line, int aChar, const QString &to
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
//selection
|
||||
if (syntaxer() && attr) {
|
||||
if (attr->tokenType() == QSynedit::TokenType::Keyword) {
|
||||
|
|
|
@ -413,7 +413,6 @@ void QSynEditPainter::paintToken(
|
|||
mPainter->setFont(font);
|
||||
fontInited = true;
|
||||
}
|
||||
//qDebug()<<"paint 1:"<<textToPaint;
|
||||
mPainter->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,12 +663,12 @@ 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 (
|
||||
(showGlyphs == mTokenAccu.showSpecialGlyphs) &&
|
||||
// background color must be the same and
|
||||
(mTokenAccu.background == background) &&
|
||||
// foreground color must be the same or token is only spaces
|
||||
|
@ -678,7 +676,6 @@ void QSynEditPainter::addHighlightToken(
|
|||
bCanAppend = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// If we can't append it, then we have to paint the old token chars first.
|
||||
if (!bCanAppend)
|
||||
paintHighlightToken(lineText, glyphStartCharList, glyphStartPositionList, false);
|
||||
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue