mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 10:39:18 +02:00
IDE: syncompletion: improve painting of arguments (sum of textparts width is bigger than the whole text width on Qt).
git-svn-id: trunk@57836 -
This commit is contained in:
parent
44882f708a
commit
864261daa3
@ -233,12 +233,14 @@ var
|
||||
nTokenLen: integer;
|
||||
Attr: TSynHighlightElement;
|
||||
CurForeground: TColor;
|
||||
LeftText: string;
|
||||
begin
|
||||
if MeasureOnly then begin
|
||||
Inc(Result.X,ACanvas.TextWidth(s));
|
||||
exit;
|
||||
end;
|
||||
if (Highlighter<>nil) and AllowFontColor then begin
|
||||
LeftText := '';
|
||||
Highlighter.ResetRange;
|
||||
Highlighter.SetLine(s,0);
|
||||
while not Highlighter.GetEol do begin
|
||||
@ -251,8 +253,8 @@ var
|
||||
if CurForeground=clNone then
|
||||
CurForeground:=TColor(ForegroundColor);
|
||||
SetFontColor(CurForeground);
|
||||
ACanvas.TextOut(x+1,y,s);
|
||||
inc(x,ACanvas.TextWidth(s));
|
||||
ACanvas.TextOut(x+1+ACanvas.TextWidth(LeftText),y,s);
|
||||
LeftText += s;
|
||||
end;
|
||||
Highlighter.Next;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user