While making my project cross-platform, my last hurdle today was HTML display (used for displaying update notice and the integrated help).
I've been using TFrameViewer09 for many years, but it displays a blank page on Cocoa. To use RichMemo, my first alternative, I would have needed a HTML to RTF converter.
I then found TIpHTMLPanel. TurboPower is a name that rings a bell, I used libraries from a company by that name like 25 years ago for creating GUIs on Turbo Pascal 5.5.
Works fine - except for the background color. The background is always white for me.
I do set the default colors this way:
if Assigned(FHTMLIP) then begin
FHTMLIP.Color := AStyle.Window.BackgroundColor;
FHTMLIP.DefaultTypeFace := AStyle.Window.FontName;
FHTMLIP.LinkColor := AStyle.Table.Header.ActionFont.FontHoveredColor;
FHTMLIP.BgColor := AStyle.Window.BackgroundColor;
FHTMLIP.ALinkColor := AStyle.Table.Header.ActionFont.FontHoveredColor;
end;
This is called in SetParent before the HTML is loaded from the files resources. Settng the type face and link color works correctly.
What can I do to get the background correct?
(adding it as css is not an option, since due to support for Dark Mode in Windows and MacOS I need to toggle background & font colors.