mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 01:59:08 +02:00
IDE: Minor cleanup in component palette options.
git-svn-id: trunk@46848 -
This commit is contained in:
parent
6ddc19d342
commit
dbf5bd53d4
@ -500,20 +500,14 @@ var
|
|||||||
Comp: TRegisteredComponent;
|
Comp: TRegisteredComponent;
|
||||||
ARect: TRect;
|
ARect: TRect;
|
||||||
CurIcon: TCustomBitmap;
|
CurIcon: TCustomBitmap;
|
||||||
IconWidth, IconHeight: Integer;
|
|
||||||
begin
|
begin
|
||||||
Comp := TRegisteredComponent(Item.Data);
|
Comp := TRegisteredComponent(Item.Data);
|
||||||
ARect := Item.DisplayRect(drIcon);
|
ARect := Item.DisplayRect(drIcon);
|
||||||
CurIcon := nil;
|
if Comp is TPkgComponent then begin
|
||||||
if Comp is TPkgComponent then
|
|
||||||
CurIcon := TPkgComponent(Comp).Icon;
|
CurIcon := TPkgComponent(Comp).Icon;
|
||||||
if CurIcon<>nil then
|
if CurIcon<>nil then
|
||||||
begin
|
Sender.Canvas.Draw(ARect.Left+(25-CurIcon.Width) div 2,
|
||||||
IconWidth := CurIcon.Width;
|
ARect.Top+(ARect.Bottom-ARect.Top-CurIcon.Height) div 2, CurIcon);
|
||||||
IconHeight := CurIcon.Height;
|
|
||||||
Sender.Canvas.Draw(ARect.Left+(25-IconWidth) div 2,
|
|
||||||
ARect.Top+(ARect.Bottom-ARect.Top-IconHeight) div 2, CurIcon);
|
|
||||||
ARect.Left := ARect.Left + IconWidth + 2;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user