mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 14:39:13 +02:00
update bookmark icons
git-svn-id: trunk@14358 -
This commit is contained in:
parent
3b2ef57a07
commit
1382b29f7a
@ -34,7 +34,7 @@
|
|||||||
{$DEFINE DisableFakeMethods}
|
{$DEFINE DisableFakeMethods}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
{.$DEFINE EnableDocking}
|
{$DEFINE EnableDocking}
|
||||||
|
|
||||||
// end.
|
// end.
|
||||||
|
|
||||||
|
@ -679,14 +679,23 @@ end;
|
|||||||
|
|
||||||
function TSourceMarks.AddImage(const ResName: string): integer;
|
function TSourceMarks.AddImage(const ResName: string): integer;
|
||||||
var
|
var
|
||||||
APixmap: TPixmap;
|
Bitmap: TBitmap;
|
||||||
|
Resource: TLResource;
|
||||||
begin
|
begin
|
||||||
APixmap:=TPixMap.Create;
|
Resource:=LazarusResources.Find(ResName);
|
||||||
APixmap.TransparentColor:=clBtnFace;
|
if Resource=nil then
|
||||||
APixmap.LoadFromLazarusResource(ResName);
|
DebugLn('TSourceMarks.AddImage: ',
|
||||||
Result:=ImgList.Count;
|
' WARNING: icon not found: "',ResName,'"');
|
||||||
ImgList.Add(APixmap,nil);
|
if SysUtils.CompareText(Resource.ValueType,'xpm')=0 then begin
|
||||||
APixmap.Free;
|
Bitmap:=TPixmap.Create;
|
||||||
|
end else if SysUtils.CompareText(Resource.ValueType,'png')=0 then begin
|
||||||
|
Bitmap:=TPortableNetworkGraphic.Create;
|
||||||
|
end else
|
||||||
|
DebugLn('TSourceMarks.AddImage: ',
|
||||||
|
' WARNING: wrong icon format: "',ResName,'"="',Resource.ValueType,'"');
|
||||||
|
Bitmap.LoadFromLazarusResource(ResName);
|
||||||
|
Result:=ImgList.Add(Bitmap,nil);
|
||||||
|
Bitmap.Free;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TSourceMarks.GetSourceEditor(AMark: TSourceMark): TObject;
|
function TSourceMarks.GetSourceEditor(AMark: TSourceMark): TObject;
|
||||||
|
Loading…
Reference in New Issue
Block a user