mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-07 06:57:23 +01:00
win32: draw hint text using theme services (part of issue #0018799)
git-svn-id: trunk@29641 -
This commit is contained in:
parent
2c76183be2
commit
76bf4fb595
@ -124,10 +124,13 @@ var
|
||||
Details: TThemedElementDetails;
|
||||
begin
|
||||
ARect := ClientRect;
|
||||
if (Color = clInfoBk) or (Color = clDefault) then // draw using themes
|
||||
if (Color = clInfoBk) or (Color = clDefault) then
|
||||
begin
|
||||
// draw using themes
|
||||
Details := ThemeServices.GetElementDetails(tttStandardLink);
|
||||
ThemeServices.DrawElement(Canvas.Handle, Details, ARect);
|
||||
InflateRect(ARect, - 2 * HintBorderWidth, - 2 * HintBorderWidth);
|
||||
ThemeServices.DrawText(Canvas, Details, Caption, ARect, GetDrawTextFlags, 0);
|
||||
end
|
||||
else
|
||||
begin
|
||||
@ -135,10 +138,10 @@ begin
|
||||
Canvas.Pen.Width := 1;
|
||||
Canvas.FillRect(ARect);
|
||||
DrawEdge(Canvas.Handle, ARect, BDR_RAISEDOUTER, BF_RECT);
|
||||
InflateRect(ARect, - 2 * HintBorderWidth, - 2 * HintBorderWidth);
|
||||
DrawText(Canvas.GetUpdatedHandle([csFontValid]), PChar(Caption),
|
||||
Length(Caption), ARect, GetDrawTextFlags);
|
||||
end;
|
||||
InflateRect(ARect, - 2 * HintBorderWidth, - 2 * HintBorderWidth);
|
||||
DrawText(Canvas.GetUpdatedHandle([csFontValid]), PChar(Caption),
|
||||
Length(Caption), ARect, GetDrawTextFlags);
|
||||
end;
|
||||
|
||||
class function THintWindow.GetControlClassDefaultSize: TSize;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user