Skip to content

Commit af911a9

Browse files
committed
Update icons
1 parent 9a2e4b2 commit af911a9

File tree

11 files changed

+42
-19
lines changed

11 files changed

+42
-19
lines changed

src/main/java/dev/blachut/svelte/lang/SvelteHtmlFileType.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class SvelteHtmlFileType : LanguageFileType(SvelteHTMLLanguage.INSTANCE) {
1818
}
1919

2020
override fun getIcon(): Icon? {
21-
return SvelteIcons.FILE
21+
return SvelteIcons.COLOR
2222
}
2323

2424
companion object {

src/main/java/dev/blachut/svelte/lang/actions/SvelteCreateComponentAction.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import com.intellij.psi.PsiDirectory
1010
import com.intellij.psi.PsiFile
1111
import dev.blachut.svelte.lang.icons.SvelteIcons
1212

13-
class SvelteCreateComponentAction : CreateFileFromTemplateAction(NAME, DESCRIPTION, SvelteIcons.FILE), DumbAware {
13+
class SvelteCreateComponentAction : CreateFileFromTemplateAction(NAME, DESCRIPTION, SvelteIcons.COLOR), DumbAware {
1414
companion object {
1515
private const val TEMPLATE_NAME: String = "Svelte Component"
1616
private const val NAME = "Svelte Component"
@@ -20,7 +20,7 @@ class SvelteCreateComponentAction : CreateFileFromTemplateAction(NAME, DESCRIPTI
2020
override fun buildDialog(project: Project, directory: PsiDirectory, builder: CreateFileFromTemplateDialog.Builder) {
2121
builder
2222
.setTitle("New $NAME")
23-
.addKind(NAME, SvelteIcons.FILE, TEMPLATE_NAME)
23+
.addKind(NAME, SvelteIcons.COLOR, TEMPLATE_NAME)
2424
}
2525

2626
override fun getActionName(directory: PsiDirectory?, newName: String, templateName: String?): String = "Create $NAME $newName"

src/main/java/dev/blachut/svelte/lang/codeInsight/SvelteTagProvider.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ val svelteTagNames = arrayOf("self", "component", "window", "body", "head", "opt
2727

2828
// TODO Merge with svelteBareTagLookupElements
2929
val svelteNamespacedTagLookupElements = svelteTagNames.map {
30-
LookupElementBuilder.create(sveltePrefix + it).withIcon(SvelteIcons.FILE)
30+
LookupElementBuilder.create(sveltePrefix + it).withIcon(SvelteIcons.GRAY)
3131
}
3232

3333
/**
3434
* When user auto completes after writing colon in "svelte", editor will produce i.e. "svelte:svelte:self".
3535
* I'm clearly missing something, but for now, let it be.
3636
*/
3737
val svelteBareTagLookupElements = svelteTagNames.map {
38-
val lookupElement = LookupElementBuilder.create(it).withIcon(SvelteIcons.FILE)
38+
val lookupElement = LookupElementBuilder.create(it).withIcon(SvelteIcons.GRAY)
3939
PrioritizedLookupElement.withPriority(lookupElement, mediumPriority)
4040
}
4141

src/main/java/dev/blachut/svelte/lang/completion/SvelteAttributeNameCompletionProvider.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class SvelteAttributeNameCompletionProvider : CompletionProvider<CompletionParam
2121
if (xmlTag.name == "script" && xmlTag.getAttribute("context") == null) {
2222
val element = LookupElementBuilder
2323
.create("context=\"module\"")
24-
.withIcon(SvelteIcons.FILE)
24+
.withIcon(SvelteIcons.GRAY)
2525
.let { PrioritizedLookupElement.withPriority(it, 10.0) }
2626

2727
result.addElement(element)

src/main/java/dev/blachut/svelte/lang/icons/SvelteIcons.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ package dev.blachut.svelte.lang.icons
33
import com.intellij.openapi.util.IconLoader
44

55
object SvelteIcons {
6-
val FILE = IconLoader.getIcon("/icons/svelte-logo.svg")
6+
val COLOR = IconLoader.getIcon("/icons/desaturated.svg")
7+
val GRAY = IconLoader.getIcon("/icons/gray.svg")
78
}
Lines changed: 7 additions & 5 deletions
Loading
Lines changed: 6 additions & 0 deletions
Loading

src/main/resources/icons/gray.svg

Lines changed: 6 additions & 0 deletions
Loading

src/main/resources/icons/original.svg

Lines changed: 9 additions & 0 deletions
Loading
Lines changed: 6 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)