Theme bugs for Custom format

Hi, I'm using the new 4.0 release which allow to have per every theme element a Custom for insert a personal style.

If I set a custom style, the standard Colour, Bold, Italics and Underline settings are completely ignored. This is the correct behavior?

The ThemeReader::initStyle do not set the standard properties if found a custom style. And also the HtmlGenerator::getAttributes only output the custom style if it is found.

I think that the custom style, at least for the html format, must extends the standard settings without replecing them, allowing you to define extra options (such as background color, pointer shape, borders, etc.). Now however, if for example I do not indicate the color in the style, the standard color of the page will be used and not the one set in the Colour property. So this theme is displayed with a completely different aspect by choosing for example the rtf output which uses only the standard properties and not the custom style.

The possibility to define an extra style is very useful, but if this completely ignores the standard properties I seems to me that it breaks the functionality of having output with different formats (ansi, html, rtf ...) visually similar.

There are also other bugs inside the ThemeReader::load:

  • At line 179 a custom html style will be set for the LineNumber for disable the user selection. But this overrides any custom style defined in the theme, and then only the Colour value is considered and the Bold, Italics and Underline base settings are ignored.
  • At line 204, the keywords attributes are processed. The ElementStyle kwStyle is defined outside the loop and the populated with the value of every keyword. But the initStyle do not reset the data before filling it with the new settings. So if for example the keyword1 have a custom style, also all other keywords inherit this style (unless someone defines their own). Same bug afflict also the SemanticTokenTypes parsing.

Really many thanks for your work!

Edited by sbarex