Add icon for Kotlin/Native
Issue #KT-27150 Fixed
This commit is contained in:
@@ -58,4 +58,5 @@ public interface KotlinIcons {
|
|||||||
|
|
||||||
Icon JS = IconLoader.getIcon("/org/jetbrains/kotlin/idea/icons/kotlin_js.png");
|
Icon JS = IconLoader.getIcon("/org/jetbrains/kotlin/idea/icons/kotlin_js.png");
|
||||||
Icon MPP = IconLoader.getIcon("/org/jetbrains/kotlin/idea/icons/kotlin_multiplatform_project.png");
|
Icon MPP = IconLoader.getIcon("/org/jetbrains/kotlin/idea/icons/kotlin_multiplatform_project.png");
|
||||||
|
Icon NATIVE = IconLoader.getIcon("/org/jetbrains/kotlin/idea/icons/kotlin_native.svg");
|
||||||
}
|
}
|
||||||
|
|||||||
+4
@@ -6,8 +6,10 @@
|
|||||||
package org.jetbrains.kotlin.ide.konan.gradle
|
package org.jetbrains.kotlin.ide.konan.gradle
|
||||||
|
|
||||||
import com.intellij.openapi.vfs.VirtualFile
|
import com.intellij.openapi.vfs.VirtualFile
|
||||||
|
import org.jetbrains.kotlin.idea.KotlinIcons
|
||||||
import org.jetbrains.kotlin.idea.configuration.KotlinGradleAbstractMultiplatformModuleBuilder
|
import org.jetbrains.kotlin.idea.configuration.KotlinGradleAbstractMultiplatformModuleBuilder
|
||||||
import org.jetbrains.kotlin.konan.target.presetName
|
import org.jetbrains.kotlin.konan.target.presetName
|
||||||
|
import javax.swing.Icon
|
||||||
|
|
||||||
class KotlinGradleNativeMultiplatformModuleBuilder : KotlinGradleAbstractMultiplatformModuleBuilder() {
|
class KotlinGradleNativeMultiplatformModuleBuilder : KotlinGradleAbstractMultiplatformModuleBuilder() {
|
||||||
|
|
||||||
@@ -17,6 +19,8 @@ class KotlinGradleNativeMultiplatformModuleBuilder : KotlinGradleAbstractMultipl
|
|||||||
private val nativeSourceName get() = "$nativeTargetName$productionSuffix"
|
private val nativeSourceName get() = "$nativeTargetName$productionSuffix"
|
||||||
val nativeTestName get() = "$nativeTargetName$testSuffix"
|
val nativeTestName get() = "$nativeTargetName$testSuffix"
|
||||||
|
|
||||||
|
override fun getNodeIcon(): Icon = KotlinIcons.NATIVE
|
||||||
|
|
||||||
override fun getBuilderId() = "kotlin.gradle.multiplatform.native"
|
override fun getBuilderId() = "kotlin.gradle.multiplatform.native"
|
||||||
|
|
||||||
override fun getPresentableName() = "Kotlin/Native"
|
override fun getPresentableName() = "Kotlin/Native"
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import com.intellij.openapi.roots.libraries.NewLibraryConfiguration
|
|||||||
import com.intellij.openapi.roots.libraries.ui.LibraryEditorComponent
|
import com.intellij.openapi.roots.libraries.ui.LibraryEditorComponent
|
||||||
import com.intellij.openapi.vfs.VirtualFile
|
import com.intellij.openapi.vfs.VirtualFile
|
||||||
import org.jetbrains.kotlin.idea.KotlinIcons
|
import org.jetbrains.kotlin.idea.KotlinIcons
|
||||||
|
import javax.swing.Icon
|
||||||
import javax.swing.JComponent
|
import javax.swing.JComponent
|
||||||
|
|
||||||
object NativeLibraryType : LibraryType<DummyLibraryProperties>(NativeLibraryKind) {
|
object NativeLibraryType : LibraryType<DummyLibraryProperties>(NativeLibraryKind) {
|
||||||
@@ -25,5 +26,5 @@ object NativeLibraryType : LibraryType<DummyLibraryProperties>(NativeLibraryKind
|
|||||||
project: Project
|
project: Project
|
||||||
): NewLibraryConfiguration? = null
|
): NewLibraryConfiguration? = null
|
||||||
|
|
||||||
override fun getIcon(properties: DummyLibraryProperties?) = KotlinIcons.MPP
|
override fun getIcon(properties: DummyLibraryProperties?): Icon = KotlinIcons.NATIVE
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="kotlinnative4-a" x1="-16.836%" x2="76.219%" y1="91.94%" y2="-1.116%">
|
||||||
|
<stop offset="10.75%" stop-color="#C757BC"/>
|
||||||
|
<stop offset="21.38%" stop-color="#D0609A"/>
|
||||||
|
<stop offset="42.54%" stop-color="#E1725C"/>
|
||||||
|
<stop offset="60.48%" stop-color="#EE7E2F"/>
|
||||||
|
<stop offset="74.3%" stop-color="#F58613"/>
|
||||||
|
<stop offset="82.32%" stop-color="#F88909"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<g fill="none" fill-rule="evenodd" transform="translate(1 1)">
|
||||||
|
<polygon fill="#0EAEFF" points="0 0 0 7.39 0 7.392 0 13.998 6 13.998 6 7.987 6.987 6.999 7.051 6.999 7.019 6.968 14 0"/>
|
||||||
|
<polygon fill="url(#kotlinnative4-a)" fill-rule="nonzero" points="7.023 0 0 7.397 0 14 7.023 6.977 14 0"/>
|
||||||
|
<path fill="#9AA7B0" d="M13,14 L13,15 L9,15 L9,14 L7,14 L7,13 L9,13 L9,12 L7,12 L7,11 L9,11 L9,10 L7,10 L7,9 L9,9 L9,8 L13,8 L13,9 L15,9 L15,10 L13,10 L13,11 L15,11 L15,12 L13,12 L13,13 L15,13 L15,14 L13,14 Z"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
Reference in New Issue
Block a user