mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-28 17:27:49 +08:00
work_with_icons_and_images.md: clarify icons location
This commit is contained in:
parent
39e0708438
commit
c65cfa1bf3
@ -33,7 +33,8 @@ If custom icons are required, please refer to detailed [design guide](https://je
|
|||||||
>
|
>
|
||||||
{type="tip"}
|
{type="tip"}
|
||||||
|
|
||||||
The best way to deal with icons and other image resources is to put them to a dedicated source root marked as <control>Resources Root</control>, say <path>icons</path> or <path>resources</path>.
|
In the case of a Gradle-based project, icons should be placed in the <path>resources</path> folder.
|
||||||
|
If the project is DevKit-based, the recommended approach is to put icons to a dedicated [source root](https://www.jetbrains.com/help/idea/content-roots.html) marked as <control>Resources Root</control>, say <path>icons</path> or <path>resources</path>.
|
||||||
|
|
||||||
The `getIcon()` method of [`IconLoader`](%gh-ic%/platform/util/ui/src/com/intellij/openapi/util/IconLoader.java) can be used to access the icons.
|
The `getIcon()` method of [`IconLoader`](%gh-ic%/platform/util/ui/src/com/intellij/openapi/util/IconLoader.java) can be used to access the icons.
|
||||||
The path to the icon passed in as argument to `IconLoader.getIcon()` **must** start with leading `/`.
|
The path to the icon passed in as argument to `IconLoader.getIcon()` **must** start with leading `/`.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user