themes*.md: file names formatting

This commit is contained in:
Karol Lewandowski 2022-01-26 09:27:41 +01:00
parent ec48790715
commit 18d79a72ff
4 changed files with 21 additions and 21 deletions

View File

@ -12,8 +12,8 @@ Custom UI Themes can:
## The Structure of a UI Theme
UI Themes are components within IntelliJ Platform plugins.
Theme plugins should be stand-alone plugins, and not combined with other plugin functionality.
This approach is the best user experience because it avoids an IDE restart when installing a UI Theme plugin.
The theme plugins should be stand-alone and not combined with other plugin functionality.
This approach provides the best user experience because it avoids an IDE restart when installing a UI Theme plugin.
UI Themes have several components:
* A required Theme description (JSON) file in the plugin project's <path>resources</path> folder.

View File

@ -24,7 +24,7 @@ It may also help to review some of the [UI Themes available](https://plugins.jet
## Defining Named Colors
Colors can always be defined individually as six-digit RGB or eight-digit RGBA hexadecimal notation.
However, Theme definitions often use the same color in multiple places.
Maintaining a Theme is more manageable if _Named Colors_ are globally defined in a `colors {}` block as part of the `*.theme.json` file.
Maintaining a Theme is more manageable if _Named Colors_ are globally defined in a `colors {}` block as part of the <path>*.theme.json<path> file.
After that, the Named Color can be used instead of a hexadecimal description of the color.
For example, defining the Named Color `basicBackground` and then using it to set the background color of panels.
(Don't be concerned with the `"ui"` syntax in the example below; it will be discussed in [Custom UI Control Colors](#custom-ui-control-colors).)

View File

@ -15,16 +15,16 @@ Note that editor [Colors and Fonts](https://www.jetbrains.com/help/idea/configur
Use the following procedure to customize an editor color scheme for a UI Theme:
* Create the desired custom editor color scheme using the IDE preferences.
* Export the custom editor color scheme to the desired file name.
In this example, the file is exported to `Lightning.icls`
* Once exported, change the file extension from `*.icls` to `*.xml`.
In this example, the result is `Lightning.xml`.
In this example, the file is exported to <path>Lightning.icls</path>.
* Once exported, change the file extension from <path>\*.icls</path> to <path>\*.xml</path>.
In this example, the result is <path>Lightning.xml</path>.
* See [Customizing Editor Scroll Bar Colors](#customizing-editor-scroll-bar-colors) to change the colors of editor scroll bars.
### Incorporating the Editor Color Scheme in the Custom UI Theme
The next step is to add the color scheme to the UI Theme plugin project:
* Replace the default generated custom editor color scheme XML file (in this example `theme_basics.xml`) in the `resources` folder with the exported custom editor color scheme.
In this case, the action is to _replace_ `theme_basics.xml` with `Lightning.xml`.
* In the UI Theme file (in this example `theme_basics.theme.json`,) replace the name of the generated editor scheme file (`theme_basics.xml`) with the new (`Lightning.xml`) file name.
* Replace the default generated custom editor color scheme XML file (in this example, <path>theme_basics.xml</path>) in the project's <path>resources</path> folder with the exported custom editor color scheme.
In this case, the action is to _replace_ <path>theme_basics.xml</path> with <path>Lightning.xml</path>.
* In the UI Theme file (in this example <path>theme_basics.theme.json</path>), replace the name of the generated editor scheme file (<path>theme_basics.xml</path>) with the new (<path>Lightning.xml</path>) file name.
The `key` is always "editorScheme".
The `value` is the name of the editor color scheme file.
@ -73,7 +73,7 @@ For additional examples of `FILESTATUS` color `name` attributes, see the editor
### Customizing Editor Scroll Bar Colors
Editor scroll bar colors should be coordinated with, and switch together with an editor color scheme.
Please note that Custom UI Theme (`*.theme.json`) files also contain `ScrollBar.*` name attributes, but these are for scroll bars outside the context of the editor.
Please note that Custom UI Theme (<path>*.theme.json</path>) files also contain `ScrollBar.*` name attributes, but these are for scroll bars outside the context of the editor.
> The Editor Scroll Bar colors are the only editor scheme settings that cannot be customized and exported through IDE preferences.
>
@ -117,7 +117,7 @@ The `name` attribute patterns are enumerated below.
The horizontal scroll bar background color is set by `ScrollBar.background`.
This background color is visible only if the horizontal scroll bar's `*.trackColor` has transparency.
At this time the vertical scrollbar background color cannot be customized.
At this time, the vertical scrollbar background color cannot be customized.
**Windows/Linux Name Attributes**
@ -139,7 +139,7 @@ Users can do this manually in [Preferences](https://www.jetbrains.com/help/idea/
UI Themes support specifying a background image as a key-value pair in the `"background": {}` section of a Theme description file:
* The `image` key uses the file name of the image as the value.
The background image is placed in the UI Theme plugin project's resources folder.
The background image is placed in the UI Theme plugin project's <path>resources</path> folder.
* The `transparency` key uses a `value` of 1-100.
A `value` of 100 is opaque.
* The `fill` key uses a value of `scale`, meaning to expand the image to fill the space as the window gets resized.
@ -162,4 +162,4 @@ Theme description file:
"anchor": "center"
}
}
```
```

View File

@ -1,10 +1,10 @@
[//]: # (title: Exposing Theme Metadata)
All available UI Customization Keys that can be used in [Custom Themes](themes_customize.md) must be defined in a dedicated `*.themeMetadata.json` file which is registered via `com.intellij.themeMetadataProvider` extension point.
All available UI Customization Keys that can be used in [Custom Themes](themes_customize.md) must be defined in a dedicated <path>*.themeMetadata.json</path> file which is registered via `com.intellij.themeMetadataProvider` extension point.
The following minimal sample demonstrates all details required when exposing UI customization keys of your plugin's UI.
`/resources/META-INF/plugin.xml`:
<path>/resources/META-INF/plugin.xml</path>:
```xml
<idea-plugin>
@ -14,7 +14,7 @@ The following minimal sample demonstrates all details required when exposing UI
</idea-plugin>
```
`/resources/META-INF/MyPlugin.themeMetadata.json`:
<path>/resources/META-INF/MyPlugin.themeMetadata.json</path>:
```json
{
@ -25,7 +25,7 @@ The following minimal sample demonstrates all details required when exposing UI
"key": "MyComponent.border",
"description": "The border for my component. Not used anymore.",
"deprecated": true,
"source": "com.myplugin.MyComponent",
"source": "com.myplugin.MyComponent"
},
{
[more keys...]
@ -40,7 +40,7 @@ The following minimal sample demonstrates all details required when exposing UI
- `ui` - Root element listing all customization keys:
- `key` - Customization key name (see [Key Naming Scheme](#key-naming-scheme))
- `description` - Description to be shown to Theme authors editing `*.theme.json` files
- `description` - Description to be shown to Theme authors editing <path>*.theme.json</path> files
- `deprecated` - `true` when key is deprecated, please provide explanation and/or replacement in `description` if available
- `source` - FQN of the underlying UI component implementation
- `since` - The release number (e.g. `[2019.2]`) when this UI customization key was exposed.
@ -157,10 +157,10 @@ Examples of Swing keys:
{type="note"}
Metadata is split up as follows:
- [`IntelliJPlatform.themeMetadata.json`](upsource:///platform/platform-resources/src/themes/metadata/IntelliJPlatform.themeMetadata.json) - all keys from IntelliJ Platform and custom UI components
- [`JDK.themeMetadata.json`](upsource:///platform/platform-resources/src/themes/metadata/JDK.themeMetadata.json) - all keys from Swing components
- <path>[IntelliJPlatform.themeMetadata.json`](upsource:///platform/platform-resources/src/themes/metadata/IntelliJPlatform.themeMetadata.json)</path> - all keys from IntelliJ Platform and custom UI components
- <path>[JDK.themeMetadata.json`](upsource:///platform/platform-resources/src/themes/metadata/JDK.themeMetadata.json)</path> - all keys from Swing components
New keys should be added to `IntelliJPlatform.themeMetadata.json` only (or corresponding "local" `*.themeMetadata.json` file of the plugin if applicable).
New keys should be added to <path>IntelliJPlatform.themeMetadata.json</path> only (or corresponding "local" <path>*.themeMetadata.json</path> file of the plugin if applicable).
Please make sure to add a `description` and use `since` and `deprecated` attributes explained in [Attributes](#attributes).
Respect [Key Naming Scheme](#key-naming-scheme) and keep alphabetical ordering of keys.