Skip to content

Commit 5cbb555

Browse files
committed
add <WordsStyle> colorStyle description to UDL XML description.
replicate `<WordsStyle>` `colorStyle` and `fontStyle` description from UDL to config-files `stylers.xml` description (same behavior in builtin styler)
1 parent 030c61a commit 5cbb555

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

content/docs/config-files.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,16 @@ Each lexer type has it's own `<LexerType>` section, with multiple `<WordsStyle>`
186186

187187
If you have added user-defined keywords in the [**Settings > Style Configurator**](../preferences/#style-configurator), they will be stored as the contents of the `<WordsStyle>`, as a space-separated list (for example, `<WordsStyle>fancyKeyword1 fancyKeyword2</WordsStyle>`).
188188

189+
The `<WordsStyle>` `fontStyle` attribute encodes the setting of the **Bold**, **Italic**, and **Underline** checkboxes from the **Styler** dialog, using the sum of **Italic**=1, **Bold**=2, and **Underline**=4 (so something with all three checkboxes set would have `fontStyle="7"`).
190+
191+
The `<WordsStyle>` `colorStyle` attribute decides whether to use the defined colors from `fgColor` and `bgColor` attributes, or to use the default color setting (from **Settings > Style Configurator > Global Styles > Default Style**). The attribute should be set to one of the following:
192+
193+
* No `colorStyle` attribute: this style will use both the `fgColor` and `bgColor` attributes from this `<WordsStyle>` item (standard behavior)
194+
* Set `colorStyle="2"`: this style will inherit the foreground color from the Default style, and use the `bgColor` value as the background color (equivalent to right-clicking the foreground color in the UDL styler dialog box)
195+
* Set `colorStyle="1"`: this style will inherit the background color from the Default style, and use the `fgColor` value as the background color (equivalent to right-clicking the background color in the UDL styler dialog box)
196+
* Set `colorStyle="0"`: this style will inherit both the foreground and background colors from the Default style (equivalent to right-clicking both the foreground and background colors in the UDL styler dialog box)
197+
198+
189199
## `functionList.xml`
190200

191201
Defines what counts as a "function" for **View > Function List**. There are some comments in the file, and lots of examples of the builtin languages, which you can customize.

content/docs/user-defined-language-system.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,9 @@ Most of the settings in the UDL definition files correspond directly to the name
102102
| Delimiter 7 | 64 | | Keyword 7 | 65536 | | | |
103103
| Delimiter 8 | 128 | | Keyword 8 | 131072 | | | |
104104

105+
The `<WordsStyle>` `colorStyle` attribute decides whether to use the defined colors from `fgColor` and `bgColor` attributes, or to use the default color setting (from **Settings > Style Configurator > Global Styles > Default Style**, _not_ from the UDL's default style). The attribute should be set to one of the following:
105106

107+
* No `colorStyle` attribute: this style will use both the `fgColor` and `bgColor` attributes from this `<WordsStyle>` item (standard behavior)
108+
* Set `colorStyle="2"`: this style will inherit the foreground color from the Default style, and use the `bgColor` value as the background color (equivalent to right-clicking the foreground color in the UDL styler dialog box)
109+
* Set `colorStyle="1"`: this style will inherit the background color from the Default style, and use the `fgColor` value as the background color (equivalent to right-clicking the background color in the UDL styler dialog box)
110+
* Set `colorStyle="0"`: this style will inherit both the foreground and background colors from the Default style (equivalent to right-clicking both the foreground and background colors in the UDL styler dialog box)

0 commit comments

Comments
 (0)