mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-10 21:38:21 +02:00
MG: right margin is now under the text
git-svn-id: trunk@2093 -
This commit is contained in:
parent
2b3ce4681a
commit
75c82f7d1c
@ -2374,8 +2374,27 @@ var
|
|||||||
pszText := PChar(@Token[First]);
|
pszText := PChar(@Token[First]);
|
||||||
nCharsToPaint := Min(Last - First + 1, TokenLen - First + 1);
|
nCharsToPaint := Min(Last - First + 1, TokenLen - First + 1);
|
||||||
end;
|
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.Right) then begin
|
||||||
|
// draw background
|
||||||
|
InternalFillRect(dc,rcToken);
|
||||||
|
// draw edge
|
||||||
|
LCLLinux.MoveToEx(dc, nRightEdge, rcToken.Top, nil);
|
||||||
|
LCLLinux.LineTo(dc, nRightEdge, rcToken.Bottom + 1);
|
||||||
|
// draw text
|
||||||
|
fTextDrawer.ExtTextOut(nX, rcToken.Top, ETOOptions-ETO_OPAQUE, rcToken,
|
||||||
|
pszText, nCharsToPaint);
|
||||||
|
end else begin
|
||||||
|
// draw text with background
|
||||||
fTextDrawer.ExtTextOut(nX, rcToken.Top, ETOOptions, rcToken,
|
fTextDrawer.ExtTextOut(nX, rcToken.Top, ETOOptions, rcToken,
|
||||||
pszText, nCharsToPaint);
|
pszText, nCharsToPaint);
|
||||||
|
end;
|
||||||
|
{$ELSE}
|
||||||
|
fTextDrawer.ExtTextOut(nX, rcToken.Top, ETOOptions, rcToken,
|
||||||
|
pszText, nCharsToPaint);
|
||||||
|
{$ENDIF}
|
||||||
rcToken.Left := rcToken.Right;
|
rcToken.Left := rcToken.Right;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -2463,6 +2482,14 @@ var
|
|||||||
rcToken.Right := rcLine.Right;
|
rcToken.Right := rcLine.Right;
|
||||||
InternalFillRect(dc, rcToken);
|
InternalFillRect(dc, rcToken);
|
||||||
end;
|
end;
|
||||||
|
{$IFDEF SYN_LAZARUS}
|
||||||
|
// Draw the right edge if necessary.
|
||||||
|
if bDoRightEdge and (not (eoHideRightMargin in Options))
|
||||||
|
and (nRightEdge>=rcToken.Left) then begin
|
||||||
|
LCLLinux.MoveToEx(dc, nRightEdge, rcToken.Top, nil);
|
||||||
|
LCLLinux.LineTo(dc, nRightEdge, rcToken.Bottom + 1);
|
||||||
|
end;
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2830,20 +2857,15 @@ var
|
|||||||
// of the invalid area with the correct colors.
|
// of the invalid area with the correct colors.
|
||||||
PaintHighlightToken(TRUE);
|
PaintHighlightToken(TRUE);
|
||||||
end;
|
end;
|
||||||
|
{$IFNDEF SYN_LAZARUS}
|
||||||
// Now paint the right edge if necessary. We do it line by line to reduce
|
// Now paint the right edge if necessary. We do it line by line to reduce
|
||||||
// the flicker. Should not cost very much anyway, compared to the many
|
// the flicker. Should not cost very much anyway, compared to the many
|
||||||
// calls to ExtTextOut.
|
// calls to ExtTextOut.
|
||||||
if bDoRightEdge then begin
|
if bDoRightEdge then begin
|
||||||
{$IFDEF SYN_LAZARUS}
|
|
||||||
if (not (eoHideRightMargin in Options)) then begin
|
|
||||||
LCLLinux.MoveToEx(dc, nRightEdge, rcLine.Top, nil);
|
|
||||||
LCLLinux.LineTo(dc, nRightEdge, rcLine.Bottom + 1);
|
|
||||||
end;
|
|
||||||
{$ELSE}
|
|
||||||
Windows.MoveToEx(dc, nRightEdge, rcLine.Top, nil);
|
Windows.MoveToEx(dc, nRightEdge, rcLine.Top, nil);
|
||||||
Windows.LineTo(dc, nRightEdge, rcLine.Bottom + 1);
|
Windows.LineTo(dc, nRightEdge, rcLine.Bottom + 1);
|
||||||
{$ENDIF}
|
|
||||||
end;
|
end;
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -3023,16 +3045,13 @@ begin
|
|||||||
if (rcToken.Top < rcToken.Bottom) then begin
|
if (rcToken.Top < rcToken.Bottom) then begin
|
||||||
SetBkColor(dc, ColorToRGB(colEditorBG));
|
SetBkColor(dc, ColorToRGB(colEditorBG));
|
||||||
InternalFillRect(dc, rcToken);
|
InternalFillRect(dc, rcToken);
|
||||||
|
{$IFNDEF SYN_LAZARUS}
|
||||||
// Draw the right edge if necessary.
|
// Draw the right edge if necessary.
|
||||||
if bDoRightEdge and (not (eoHideRightMargin in Options)) then begin
|
if bDoRightEdge and (not (eoHideRightMargin in Options)) then begin
|
||||||
{$IFDEF SYN_LAZARUS}
|
|
||||||
LCLLinux.MoveToEx(dc, nRightEdge, rcToken.Top, nil);
|
|
||||||
LCLLinux.LineTo(dc, nRightEdge, rcToken.Bottom + 1);
|
|
||||||
{$ELSE}
|
|
||||||
Windows.MoveToEx(dc, nRightEdge, rcToken.Top, nil);
|
Windows.MoveToEx(dc, nRightEdge, rcToken.Top, nil);
|
||||||
Windows.LineTo(dc, nRightEdge, rcToken.Bottom + 1);
|
Windows.LineTo(dc, nRightEdge, rcToken.Bottom + 1);
|
||||||
{$ENDIF}
|
|
||||||
end;
|
end;
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFDEF SYN_LAZARUS}
|
{$IFDEF SYN_LAZARUS}
|
||||||
|
Loading…
Reference in New Issue
Block a user