From e428e40a6f5ce2d99fbc215731fc94c182cd248f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Thu, 8 May 2025 13:40:53 +0200 Subject: [PATCH] icons & progress & loader content alignment --- topics/reference_guide/icons.md | 15 +++++++++++++-- topics/ui/controls/loader.md | 2 ++ topics/user_interface_components/ui_faq.md | 4 +--- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/topics/reference_guide/icons.md b/topics/reference_guide/icons.md index efa898dfd..282771587 100644 --- a/topics/reference_guide/icons.md +++ b/topics/reference_guide/icons.md @@ -175,6 +175,12 @@ All icon files must be placed in the same directory following this naming patter ## Animated Icons + + +**UI Guidelines:** [](loader.md) + + + 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. @@ -193,11 +199,16 @@ AnimatedIcon icon = new AnimatedIcon( To create an icon from frames with different delays, use `AnimatedIcon.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. 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. -> See `ANIMATION_IN_RENDERER_ALLOWED`'s Javadoc for details. +Alternatively, use [`AsyncProcessIcon`](%gh-ic%/platform/platform-api/src/com/intellij/util/ui/AsyncProcessIcon.java). ## Icon Tooltips diff --git a/topics/ui/controls/loader.md b/topics/ui/controls/loader.md index 3eabeaee9..dcb83ab55 100644 --- a/topics/ui/controls/loader.md +++ b/topics/ui/controls/loader.md @@ -8,6 +8,8 @@ **Implementation:** [`AnimatedIcon.Default`](%gh-ic%/platform/ide-core/src/com/intellij/ui/AnimatedIcon.java) +**Related:** [](icons.md#animated-icons) + A loader informs users about performing a lengthy operation. diff --git a/topics/user_interface_components/ui_faq.md b/topics/user_interface_components/ui_faq.md index 641a39701..ac48b4062 100644 --- a/topics/user_interface_components/ui_faq.md +++ b/topics/user_interface_components/ui_faq.md @@ -78,9 +78,7 @@ If you use the insets elsewhere, you need to manually call `JBInsets.update()` i ## Icons -### Progress - -Animated progress icons can be obtained via [`AsyncProcessIcon`](%gh-ic%/platform/platform-api/src/com/intellij/util/ui/AsyncProcessIcon.java). +### Progress Placeholder [`LoadingDecorator`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/ui/LoadingDecorator.kt) provides "loading" placeholder panel.