mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-03 12:20:32 +02:00
Fixed drawing text on win32
git-svn-id: trunk@5399 -
This commit is contained in:
parent
5effa0b10e
commit
684a402fca
@ -441,6 +441,7 @@ var
|
||||
TheText: string;
|
||||
TheTop: integer;
|
||||
MatchPos: TLazSearchMatchPos;
|
||||
TextEnd: integer;
|
||||
begin
|
||||
With Control as TLazSearchResultLB do
|
||||
begin
|
||||
@ -460,17 +461,17 @@ begin
|
||||
LastPart:= copy(TheText, MatchPos.MatchStart + BoldLen,
|
||||
Length(TheText) - (MatchPos.MatchStart + BoldLen) + 2);
|
||||
Canvas.TextOut(ARect.Left, TheTop, FirstPart);
|
||||
TextEnd:= ARect.Left + Canvas.TextWidth(FirstPart);
|
||||
Canvas.Font.Style:= Canvas.Font.Style + [fsBold];
|
||||
{TODO: Find out why bold is 1 pixel off}
|
||||
Canvas.TextOut(ARect.Left + Canvas.TextWidth(FirstPart),
|
||||
TheTop - 1, BoldPart);
|
||||
{TODO: Find out why bold is 1 pixel off in gtk}
|
||||
Canvas.TextOut(TextEnd, TheTop, BoldPart);
|
||||
TextEnd:= TextEnd + Canvas.TextWidth(BoldPart);
|
||||
Canvas.Font.Style:= Canvas.Font.Style - [fsBold];
|
||||
Canvas.TextOut(ARect.Left + Canvas.TextWidth(FirstPart + BoldPart),
|
||||
TheTop, LastPart);
|
||||
Canvas.TextOut(TextEnd, TheTop, LastPart);
|
||||
end//if
|
||||
else
|
||||
begin
|
||||
Canvas.TextOut(ARect.Left, ARect.Top + 1, TheText);
|
||||
Canvas.TextOut(ARect.Left, ARect.Top, TheText);
|
||||
end;//else
|
||||
end;//with
|
||||
end;//ListBoxDrawItem
|
||||
|
Loading…
Reference in New Issue
Block a user