mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-27 16:57:49 +08:00
icons & progress & loader content alignment
This commit is contained in:
parent
69f1fc5be9
commit
e428e40a6f
@ -175,6 +175,12 @@ All icon files must be placed in the same directory following this naming patter
|
|||||||
|
|
||||||
## Animated Icons
|
## Animated Icons
|
||||||
|
|
||||||
|
<tldr>
|
||||||
|
|
||||||
|
**UI Guidelines:** [](loader.md)
|
||||||
|
|
||||||
|
</tldr>
|
||||||
|
|
||||||
Animated icons are a way to show that a plugin is now performing some long-time action, e.g., when the plugin is loading some data.
|
Animated icons are a way to show that a plugin is now performing some long-time action, e.g., when the plugin is loading some data.
|
||||||
|
|
||||||
Any animated icon is a set of frames that loop with a delay.
|
Any animated icon is a set of frames that loop with a delay.
|
||||||
@ -193,11 +199,16 @@ AnimatedIcon icon = new AnimatedIcon(
|
|||||||
To create an icon from frames with different delays, use `AnimatedIcon.Frame`.
|
To create an icon from frames with different delays, use `AnimatedIcon.Frame`.
|
||||||
Each frame represents an icon, and a delay until the next frame.
|
Each frame represents an icon, and a delay until the next frame.
|
||||||
|
|
||||||
|
> Set [`AnimatedIcon.ANIMATION_IN_RENDERER_ALLOWED`](%gh-ic%/platform/ide-core/src/com/intellij/ui/AnimatedIcon.java) client property to `true` for list, table,
|
||||||
|
> and tree components to repaint animated icons automatically.
|
||||||
|
> See its Javadoc for details.
|
||||||
|
|
||||||
|
#### Progress Icon
|
||||||
|
|
||||||
Use the predefined `AnimatedIcon.Default` loader icon to indicate a long process.
|
Use the predefined `AnimatedIcon.Default` loader icon to indicate a long process.
|
||||||
This icon has a larger `AnimatedIcon.Big` version.
|
This icon has a larger `AnimatedIcon.Big` version.
|
||||||
|
|
||||||
> Add `true` [`AnimatedIcon.ANIMATION_IN_RENDERER_ALLOWED`](%gh-ic%/platform/ide-core/src/com/intellij/ui/AnimatedIcon.java) client property to list, table, and tree components to repaint animated icons automatically.
|
Alternatively, use [`AsyncProcessIcon`](%gh-ic%/platform/platform-api/src/com/intellij/util/ui/AsyncProcessIcon.java).
|
||||||
> See `ANIMATION_IN_RENDERER_ALLOWED`'s Javadoc for details.
|
|
||||||
|
|
||||||
## Icon Tooltips
|
## Icon Tooltips
|
||||||
|
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
|
|
||||||
**Implementation:** [`AnimatedIcon.Default`](%gh-ic%/platform/ide-core/src/com/intellij/ui/AnimatedIcon.java)
|
**Implementation:** [`AnimatedIcon.Default`](%gh-ic%/platform/ide-core/src/com/intellij/ui/AnimatedIcon.java)
|
||||||
|
|
||||||
|
**Related:** [](icons.md#animated-icons)
|
||||||
|
|
||||||
</tldr>
|
</tldr>
|
||||||
|
|
||||||
A loader informs users about performing a lengthy operation.
|
A loader informs users about performing a lengthy operation.
|
||||||
|
@ -78,9 +78,7 @@ If you use the insets elsewhere, you need to manually call `JBInsets.update()` i
|
|||||||
|
|
||||||
## Icons
|
## Icons
|
||||||
|
|
||||||
### Progress
|
### Progress Placeholder
|
||||||
|
|
||||||
Animated progress icons can be obtained via [`AsyncProcessIcon`](%gh-ic%/platform/platform-api/src/com/intellij/util/ui/AsyncProcessIcon.java).
|
|
||||||
|
|
||||||
[`LoadingDecorator`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/ui/LoadingDecorator.kt) provides "loading" placeholder panel.
|
[`LoadingDecorator`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/ui/LoadingDecorator.kt) provides "loading" placeholder panel.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user