mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-28 01:07:49 +08:00
themes_metadata.md: fix code sample
This commit is contained in:
parent
a772fff4c5
commit
7d803744cd
@ -1,7 +1,7 @@
|
||||
<!-- Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
|
||||
|
||||
# Exposing Theme Metadata
|
||||
|
||||
<!-- Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
|
||||
|
||||
<link-summary>Exposing plugin's UI components' customization keys allowing theme developers to change your components look.</link-summary>
|
||||
|
||||
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.
|
||||
@ -57,12 +57,14 @@ The following minimal sample demonstrates all details required when exposing UI
|
||||
> Do not remove existing keys, but deprecate them instead to help Theme authors upgrade their existing themes.
|
||||
>
|
||||
|
||||
Color keys can be used via `JBColor.namedColor()` providing defaults for Light and Dark theme:
|
||||
Color keys can be used via [`JBColor.namedColor()`](%gh-ic%/platform/util/ui/src/com/intellij/ui/JBColor.java) providing defaults for Light and Dark theme:
|
||||
|
||||
```java
|
||||
private static final Color SECTION_HEADER_FOREGROUND = JBColor.namedColor(
|
||||
"Plugins.SectionHeader.foreground",
|
||||
new JBColor(0x787878, 0x999999));
|
||||
private static final JBColor SECTION_HEADER_FOREGROUND =
|
||||
JBColor.namedColor(
|
||||
"Plugins.SectionHeader.foreground",
|
||||
new JBColor(0x787878,0x999999)
|
||||
);
|
||||
```
|
||||
|
||||
Other keys can be obtained via `javax.swing.UIManager#getXXX()` methods.
|
||||
|
Loading…
x
Reference in New Issue
Block a user