From 09d4639c89ff91cedbef95c1db7d7fc02780c026 Mon Sep 17 00:00:00 2001 From: mattias Date: Sat, 17 Aug 2002 23:41:16 +0000 Subject: [PATCH] implemented fsUnderLine for ExtTextOut for gtk git-svn-id: trunk@2337 - --- components/synedit/synedit.pp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/components/synedit/synedit.pp b/components/synedit/synedit.pp index c8ac93a96f..2802427fff 100644 --- a/components/synedit/synedit.pp +++ b/components/synedit/synedit.pp @@ -2390,10 +2390,9 @@ var Result := fTextOffset + Pred(Col) * fCharWidth; end; - // CharsBefore tells if Token starts at column one or not - procedure PaintToken(const Token: string; TokenLen, CharsBefore, First, Last: integer); + // CharsBefore tells if Token starts at column one or not var pszText: PChar; nX, nCharsToPaint: integer; @@ -2408,19 +2407,20 @@ var pszText := nil; nCharsToPaint := 0; end else begin -{$IFDEF SYN_MBCSSUPPORT} + {$IFDEF SYN_MBCSSUPPORT} if (First > 1) and (ByteType(Token, First) = mbTrailByte) then begin Dec(First); Dec(nX, fCharWidth); end; -{$ENDIF} + {$ENDIF} pszText := PChar(@Token[First]); nCharsToPaint := Min(Last - First + 1, TokenLen - First + 1); end; {$IFDEF SYN_LAZARUS} // Draw the right edge under the text if necessary if bDoRightEdge and (not (eoHideRightMargin in Options)) - and (nRightEdge>=rcToken.Left) and (nRightEdge=rcToken.Left) + then begin // draw background InternalFillRect(dc,rcToken); // draw edge @@ -2578,13 +2578,14 @@ var or (not (fsUnderline in Style) and not (fsUnderline in TokenAccu.Style) and TokenIsSpaces) then - // either special colors or same colors + // either special colors or same colors if bSpecialLine or bLineSelected or // background color must be the same and ((TokenAccu.BG = Background) and - // foreground color must be the same or token is only spaces - ((TokenAccu.FG = Foreground) or TokenIsSpaces)) - then bCanAppend := TRUE; + // foreground color must be the same or token is only spaces + ((TokenAccu.FG = Foreground) or TokenIsSpaces)) + then + bCanAppend := TRUE; // If we can't append it, then we have to paint the old token chars first. if not bCanAppend then PaintHighlightToken(FALSE);