mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 03:58:09 +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}
|
||||
{$ENDIF}
|
||||
|
||||
{.$DEFINE EnableDocking}
|
||||
{$DEFINE EnableDocking}
|
||||
|
||||
// end.
|
||||
|
||||
|
@ -679,14 +679,23 @@ end;
|
||||
|
||||
function TSourceMarks.AddImage(const ResName: string): integer;
|
||||
var
|
||||
APixmap: TPixmap;
|
||||
Bitmap: TBitmap;
|
||||
Resource: TLResource;
|
||||
begin
|
||||
APixmap:=TPixMap.Create;
|
||||
APixmap.TransparentColor:=clBtnFace;
|
||||
APixmap.LoadFromLazarusResource(ResName);
|
||||
Result:=ImgList.Count;
|
||||
ImgList.Add(APixmap,nil);
|
||||
APixmap.Free;
|
||||
Resource:=LazarusResources.Find(ResName);
|
||||
if Resource=nil then
|
||||
DebugLn('TSourceMarks.AddImage: ',
|
||||
' WARNING: icon not found: "',ResName,'"');
|
||||
if SysUtils.CompareText(Resource.ValueType,'xpm')=0 then begin
|
||||
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;
|
||||
|
||||
function TSourceMarks.GetSourceEditor(AMark: TSourceMark): TObject;
|
||||
|
Loading…
Reference in New Issue
Block a user