diff --git a/src/main/kotlin/me/zhouxi/slint/icons/SlintIcons.kt b/src/main/kotlin/me/zhouxi/slint/icons/SlintIcons.kt index be23839..d3e6cd6 100644 --- a/src/main/kotlin/me/zhouxi/slint/icons/SlintIcons.kt +++ b/src/main/kotlin/me/zhouxi/slint/icons/SlintIcons.kt @@ -1,16 +1,27 @@ package me.zhouxi.slint.icons -import com.intellij.ui.IconManager +import com.intellij.openapi.util.IconLoader import javax.swing.Icon - object SlintIcons { - private fun load(path: String, cacheKey: Int, flags: Int): Icon { - return IconManager.getInstance() - .loadRasterizedIcon(path, SlintIcons::class.java.classLoader, cacheKey, flags) - } - - val Primary: Icon = load("icons/slint-logo-small-light.png", 199921742, 2) + /** + * File type icon - 16x16 square logo that automatically adapts to light/dark theme + * IntelliJ will automatically load slintFile_dark.svg in dark mode + */ + @JvmField + val FileType: Icon = IconLoader.getIcon("/icons/slintFile.svg", SlintIcons::class.java) + /** + * Primary icon - used in various UI contexts + * Alias for FileType for backward compatibility + */ + @JvmField + val Primary: Icon = FileType + /** + * Full logo with text - for larger display areas (e.g., welcome screen, about dialog) + * Automatically adapts to theme + */ + @JvmField + val Logo: Icon = IconLoader.getIcon("/icons/slint-logo-full-light.svg", SlintIcons::class.java) } diff --git a/src/main/resources/icons/slint-logo-full-dark.svg b/src/main/resources/icons/slint-logo-full-dark.svg new file mode 100644 index 0000000..f745c44 --- /dev/null +++ b/src/main/resources/icons/slint-logo-full-dark.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/main/resources/icons/slint-logo-full-light.svg b/src/main/resources/icons/slint-logo-full-light.svg new file mode 100644 index 0000000..67afe7c --- /dev/null +++ b/src/main/resources/icons/slint-logo-full-light.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/main/resources/icons/slint-logo-square-dark.svg b/src/main/resources/icons/slint-logo-square-dark.svg new file mode 100644 index 0000000..08fd512 --- /dev/null +++ b/src/main/resources/icons/slint-logo-square-dark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/icons/slint-logo-square-light.svg b/src/main/resources/icons/slint-logo-square-light.svg new file mode 100644 index 0000000..1c265c4 --- /dev/null +++ b/src/main/resources/icons/slint-logo-square-light.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/icons/slintFile.svg b/src/main/resources/icons/slintFile.svg new file mode 100644 index 0000000..1c265c4 --- /dev/null +++ b/src/main/resources/icons/slintFile.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/icons/slintFile_dark.svg b/src/main/resources/icons/slintFile_dark.svg new file mode 100644 index 0000000..08fd512 --- /dev/null +++ b/src/main/resources/icons/slintFile_dark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + +