LCL/Paintbox: Fix incorrect painting of PaintBox frame and cross lines at design time. Issue #40198, patch by furious programming

This commit is contained in:
wp_xyz 2023-04-07 15:39:56 +02:00
parent a7f2330310
commit 483ae6e0f1

View File

@ -27,15 +27,15 @@ end;
procedure TPaintBox.Paint;
begin
if csDesigning in ComponentState then begin
Canvas.Brush.Color := Color;
with Canvas do
begin
Pen.Style := psDash;
Pen.Color:=clBlack;
Pen.Color := clBlack;
Brush.Color := Self.Color;
Brush.Style := bsClear;
Rectangle(0, 0, Self.Width - 1, Self.Height - 1);
Line(0,0,Self.Width-1,Self.Height-1);
Line(Self.Width-1,0,0,Self.Height-1);
Rectangle(0, 0, Self.Width, Self.Height);
Line(0,0,Self.Width,Self.Height);
Line(Self.Width,0,0,Self.Height);
end;
exit;
end;