* fixes for newstyle imagelist

git-svn-id: trunk@10932 -
This commit is contained in:
marc 2007-04-10 21:44:21 +00:00
parent 65004ef893
commit 584a1f6a33
3 changed files with 9 additions and 18 deletions

View File

@ -146,7 +146,7 @@ begin
// If we have a image, us it. Otherwise supply a default.
if AMenuItem.HasBitmap then
begin
i := BI.AddCopy(AMenuItem.Bitmap, AMenuItem.Bitmap);
i := BI.Add(AMenuItem.Bitmap, AMenuItem.Bitmap);
B.ImageIndex := i;
end
else

View File

@ -1289,7 +1289,8 @@ procedure TPackageEditorForm.SetupComponents;
Pixmap:=TPixmap.Create;
Pixmap.TransparentColor:=clWhite;
Pixmap.LoadFromLazarusResource(ResName);
ImageList.AddDirect(Pixmap,nil)
ImageList.Add(Pixmap,nil);
Pixmap.Free;
end;
procedure LoadBitBtnGlyph(ABitBtn: TBitBtn; const ResName: string);

View File

@ -269,23 +269,13 @@ begin
end;
procedure TPkgGraphExplorerDlg.SetupComponents;
function AddResImg(const ResName: string): integer;
var Pixmap: TPixmap;
begin
Pixmap:=TPixmap.Create;
Pixmap.TransparentColor:=clWhite;
Pixmap.LoadFromLazarusResource(ResName);
Result:=ImageList.AddDirect(Pixmap,nil)
end;
begin
ImgIndexPackage:=AddResImg('pkg_package');
ImgIndexInstalledPackage:=AddResImg('pkg_package_install');
ImgIndexInstallPackage:=AddResImg('pkg_package_autoinstall');
ImgIndexUninstallPackage:=AddResImg('pkg_package_uninstall');
ImgIndexCirclePackage:=AddResImg('pkg_package_circle');
ImgIndexMissingPackage:=AddResImg('pkg_conflict');
ImgIndexPackage := ImageList.AddLazarusResource('pkg_package');
ImgIndexInstalledPackage := ImageList.AddLazarusResource('pkg_package_install');
ImgIndexInstallPackage := ImageList.AddLazarusResource('pkg_package_autoinstall');
ImgIndexUninstallPackage := ImageList.AddLazarusResource('pkg_package_uninstall');
ImgIndexCirclePackage := ImageList.AddLazarusResource('pkg_package_circle');
ImgIndexMissingPackage := ImageList.AddLazarusResource('pkg_conflict');
PkgTreeLabel.Caption:=lisPckExplLoadedPackages;
PkgListLabel.Caption:=lisPckExplIsRequiredBy;