Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Brings formatting support to FooScript using tags such as
<b>text</b>
. The closing tag is optional, but if not used, everything up to the end of the string will be formatted. Some tags require options to be passed like:<size=14>text
. This support greatly simplifies customising playlist presets, and will open up an even deeper level of customisation down the line.The alternative is to use a QTextDocument in the playlist delegate to draw rich text, but this was found to be significantly detrimental to performance. The performance impact of tags in FooScript is negligible, though it does come with a small memory increase depending on the playlist size and formatting options used. This could be reduced/eliminated by caching the fonts and colours.
This also changes how the script scanner/lexer works. Instead of reading token by token, it tokenises the entire script at setup. This allows parsers to 'peek' ahead, and is required by the formatter in order to properly process tags.