-
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(clients): theme based icons for better visibility
- Loading branch information
Showing
18 changed files
with
47 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 24 additions & 10 deletions
34
src/main/kotlin/com/github/blarc/ai/commits/intellij/plugin/Icons.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,30 @@ | ||
package com.github.blarc.ai.commits.intellij.plugin | ||
|
||
import com.intellij.openapi.util.IconLoader | ||
import com.intellij.ui.JBColor | ||
import javax.swing.Icon | ||
|
||
object Icons { | ||
val AI_COMMITS = IconLoader.getIcon("/icons/aiCommits15.svg", javaClass) | ||
val OPEN_AI = IconLoader.getIcon("/icons/openai.svg", javaClass) | ||
val OLLAMA = IconLoader.getIcon("/icons/ollama15.svg", javaClass) | ||
val QIANFAN = IconLoader.getIcon("/icons/qianfan.png", javaClass) | ||
val GEMINI_VERTEX = IconLoader.getIcon("/icons/geminiVertex.svg", javaClass) | ||
val GEMINI_GOOGLE = IconLoader.getIcon("/icons/geminiGoogle.svg", javaClass) | ||
val ANTHROPIC = IconLoader.getIcon("/icons/anthropic.svg", javaClass) | ||
val AZURE_OPEN_AI = IconLoader.getIcon("/icons/azureOpenAi.svg", javaClass) | ||
val HUGGING_FACE = IconLoader.getIcon("/icons/huggingface.svg", javaClass) | ||
val GITHUB = IconLoader.getIcon("/icons/github15.svg", javaClass) | ||
|
||
data class AICommitsIcon(val bright: String, val dark: String?) { | ||
|
||
fun getThemeBasedIcon(): Icon { | ||
return if (JBColor.isBright() || dark == null) { | ||
IconLoader.getIcon(bright, javaClass) | ||
} else { | ||
IconLoader.getIcon(dark, javaClass) | ||
} | ||
} | ||
} | ||
|
||
val AI_COMMITS = AICommitsIcon("/icons/aiCommits15.svg", null) | ||
val OPEN_AI = AICommitsIcon("/icons/openai15bright.svg", "/icons/openai15dark.png") | ||
val OLLAMA = AICommitsIcon("/icons/ollama15.svg", null) | ||
val QIANFAN = AICommitsIcon("/icons/qianfan.png", null) | ||
val GEMINI_VERTEX = AICommitsIcon("/icons/geminiVertex.svg", null) | ||
val GEMINI_GOOGLE = AICommitsIcon("/icons/geminiGoogle.svg", null) | ||
val ANTHROPIC = AICommitsIcon("/icons/anthropic15bright.svg", "/icons/anthropic15dark.png") | ||
val AZURE_OPEN_AI = AICommitsIcon("/icons/azureOpenAi.svg", null) | ||
val HUGGING_FACE = AICommitsIcon("/icons/huggingface.svg", null) | ||
val GITHUB = AICommitsIcon("/icons/github15bright.svg", "/icons/github15dark.svg") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/resources/icons/anthropic.svg → ...ain/resources/icons/anthropic15bright.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion
2
src/main/resources/icons/github15.svg → src/main/resources/icons/github15bright.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion
2
src/main/resources/icons/openai.svg → src/main/resources/icons/openai15bright.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.