* foreground,background color sitemap reading for TOC, fixes #40402

This commit is contained in:
marcoonthegit 2023-08-19 11:04:33 +02:00
parent 203c566875
commit fb0d1c353c

View File

@ -58,7 +58,9 @@ type
siteattr_EXWINDOW_STYLES, siteattr_EXWINDOW_STYLES,
siteattr_FONT, siteattr_FONT,
siteattr_IMAGELIST, siteattr_IMAGELIST,
siteattr_IMAGETYPE siteattr_IMAGETYPE,
siteattr_BACKGROUND,
siteattr_FOREGROUND
); );
{ TChmSiteMapSubItem } { TChmSiteMapSubItem }
@ -251,7 +253,9 @@ const sitemapkws : array[TChmSiteMapItemAttrName] of string = (
'EXWINDOW STYLES', 'EXWINDOW STYLES',
'FONT', 'FONT',
'IMAGELIST', 'IMAGELIST',
'IMAGETYPE'); 'IMAGETYPE',
'BACKGROUND',
'FOREGROUND');
function indexitemcompare(Item1, Item2: Pointer): Integer; function indexitemcompare(Item1, Item2: Pointer): Integer;
begin begin
@ -397,6 +401,8 @@ begin
siteattr_FONT : Font:=TagAttributeValue; siteattr_FONT : Font:=TagAttributeValue;
siteattr_IMAGELIST : ImageList:=TagAttributeValue; siteattr_IMAGELIST : ImageList:=TagAttributeValue;
siteattr_IMAGETYPE : UseFolderImages:=uppercase(TagAttributeValue)='FOLDER'; siteattr_IMAGETYPE : UseFolderImages:=uppercase(TagAttributeValue)='FOLDER';
siteattr_BACKGROUND : BackgroundColor:=strtointdef(trim(TagAttributeValue),longint(-1));
siteattr_FOREGROUND : ForegroundColor:=strtointdef(trim(TagAttributeValue),0)
end; end;
end; end;
// writeln('0:',flevel,' ' ,aactualtag,' ',tagname,' ' ,tagattributename, ' ' ,tagattributevalue); // writeln('0:',flevel,' ' ,aactualtag,' ',tagname,' ' ,tagattributename, ' ' ,tagattributevalue);