mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-01 10:32:37 +02:00
LCL: LCLGlyphs: load from lazarus resources as well
git-svn-id: trunk@57871 -
This commit is contained in:
parent
64b220c68c
commit
80848f9dfb
@ -44,11 +44,19 @@ end;
|
||||
|
||||
function GetDefaultGlyph(ResourceName: string; ScalePercent: Integer;
|
||||
IgnoreMissingResource: Boolean): TCustomBitmap;
|
||||
var
|
||||
LRes: TLResource;
|
||||
begin
|
||||
if ScalePercent<>100 then
|
||||
ResourceName := ResourceName+'_'+IntToStr(ScalePercent);
|
||||
|
||||
Result := CreateBitmapFromResourceName(HINSTANCE, ResourceName);
|
||||
if Result=nil then
|
||||
begin
|
||||
LRes := LazarusResources.Find(ResourceName);
|
||||
if LRes<>nil then
|
||||
Result := CreateBitmapFromLazarusResource(LRes);
|
||||
end;
|
||||
if (Result=nil) and not IgnoreMissingResource then
|
||||
raise EResNotFound.CreateFmt(SResNotFound,[ResourceName]);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user