mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-17 04:29:25 +02:00
designer: paint non-visual component names using parent form brush color for filling (so on datamodule they will have clWhite bg and on form clBtnFace)
git-svn-id: trunk@22255 -
This commit is contained in:
parent
5e0d91920e
commit
cc6b1224f5
@ -2894,7 +2894,10 @@ begin
|
||||
TextSize := aDDC.Canvas.TextExtent(AComponent.Name);
|
||||
Icon.SetSize(TextSize.cx, TextSize.cy);
|
||||
TextRect := Rect(0, 0, TextSize.cx, TextSize.cy);
|
||||
Icon.Canvas.Brush.Color := clBtnFace;
|
||||
if aDDC.Form <> nil then
|
||||
Icon.Canvas.Brush.Color := aDDC.Form.Canvas.Brush.Color
|
||||
else
|
||||
Icon.Canvas.Brush.Color := clBtnFace;
|
||||
Icon.Canvas.FillRect(TextRect);
|
||||
DrawText(Icon.Canvas.Handle, PChar(AComponent.Name), -1, TextRect,
|
||||
DT_CENTER or DT_VCENTER or DT_SINGLELINE or DT_NOCLIP);
|
||||
|
Loading…
Reference in New Issue
Block a user