mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 07:39:59 +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;
|
||||
ARect: TRect;
|
||||
CurIcon: TCustomBitmap;
|
||||
IconWidth, IconHeight: Integer;
|
||||
begin
|
||||
Comp := TRegisteredComponent(Item.Data);
|
||||
ARect := Item.DisplayRect(drIcon);
|
||||
CurIcon := nil;
|
||||
if Comp is TPkgComponent then
|
||||
if Comp is TPkgComponent then begin
|
||||
CurIcon := TPkgComponent(Comp).Icon;
|
||||
if CurIcon<>nil then
|
||||
begin
|
||||
IconWidth := CurIcon.Width;
|
||||
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;
|
||||
if CurIcon<>nil then
|
||||
Sender.Canvas.Draw(ARect.Left+(25-CurIcon.Width) div 2,
|
||||
ARect.Top+(ARect.Bottom-ARect.Top-CurIcon.Height) div 2, CurIcon);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user