mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-30 02:07:50 +08:00
Add a small section to Working with Icons and Images article describing animated icons (#799)
* added a small section to Working with Icons and Images article describing animated icons
This commit is contained in:
parent
b9338e8892
commit
91acfc2830
@ -27,6 +27,7 @@ Minor Changes and Additions
|
|||||||
:
|
:
|
||||||
- Add a small section to [](php_open_api.md#utility-classes) describing `PhpFilePathUtils` utility class.
|
- Add a small section to [](php_open_api.md#utility-classes) describing `PhpFilePathUtils` utility class.
|
||||||
- Add mention of the way to programmatically open an autocomplete popup to [](code_completion.md).
|
- Add mention of the way to programmatically open an autocomplete popup to [](code_completion.md).
|
||||||
|
- Add a small section to [](work_with_icons_and_images.md) describing animated icons.
|
||||||
|
|
||||||
### May-22
|
### May-22
|
||||||
|
|
||||||
|
@ -156,3 +156,25 @@ Here are examples of <path>toolWindowStructure.png</path> icon representations:
|
|||||||
| Darcula | <path>toolWindowStructure_dark.png</path> |  |
|
| Darcula | <path>toolWindowStructure_dark.png</path> |  |
|
||||||
| Default + Retina | <path>toolWindowStructure@2x.png</path> |  |
|
| Default + Retina | <path>toolWindowStructure@2x.png</path> |  |
|
||||||
| Darcula + Retina | <path>toolWindowStructure@2x_dark.png</path> |  |
|
| Darcula + Retina | <path>toolWindowStructure@2x_dark.png</path> |  |
|
||||||
|
|
||||||
|
## Animated Icons
|
||||||
|
|
||||||
|
Animated icons are a way to show that plugin is now performing some long-time action.
|
||||||
|
For example, when plugin is loading some data.
|
||||||
|
|
||||||
|
Any animated icon is a set of frames that loop with some delay.
|
||||||
|
|
||||||
|
To create a new animated icon, use the
|
||||||
|
[`AnimatedIcon`](upsource:///platform/platform-impl/src/com/intellij/ui/AnimatedIcon.java).
|
||||||
|
|
||||||
|
If you want to create an icon where frames follow each other with the same delay, use a constructor that accepts a delay and icons:
|
||||||
|
|
||||||
|
```java
|
||||||
|
AnimatedIcon icon = new AnimatedIcon(500, AllIcons.Ide.Macro.Recording_1, AllIcons.Ide.Macro.Recording_2);
|
||||||
|
```
|
||||||
|
|
||||||
|
To create an icon from frames with different delays, use `AnimatedIcon.Frame`.
|
||||||
|
Each frame represents an icon, and a delay until the next frame.
|
||||||
|
|
||||||
|
If you want to show somewhere that there is a long process, you can use the predefined `AnimatedIcon.Default` loader icon.
|
||||||
|
This icon has a larger `AnimatedIcon.Big` version.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user