1
0
mirror of https://github.com/chylex/IntelliJ-Colored-Icons.git synced 2025-09-15 17:32:11 +02:00

Compare commits

...

1 Commits

Author SHA1 Message Date
71323fbd50 New UI 2023-12-11 12:31:24 +01:00
7 changed files with 104 additions and 19 deletions

View File

@@ -1,22 +1,48 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 32 26" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<g id="Light">
<rect x="2" y="18" width="5.5" height="5.5" style="fill:#b76db7;"/>
<rect x="8.5" y="18" width="5.5" height="5.5" style="fill:#6e6e6e;"/>
<rect x="2" y="5" width="5.5" height="5.5" style="fill:#59a869;"/>
<rect x="8.5" y="5" width="5.5" height="5.5" style="fill:#eda200;"/>
<rect x="2" y="11.5" width="5.5" height="5.5" style="fill:#389fd6;"/>
<rect x="8.5" y="11.5" width="5.5" height="5.5" style="fill:#db5860;"/>
<text x="5.832px" y="3.216px" style="font-family:'ArialMT', 'Arial', sans-serif;font-size:2px;">Light</text>
<svg width="100%" height="100%" viewBox="0 0 33 29" version="1.1" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<g id="Dark---New" serif:id="Dark / New">
<rect x="28" y="24" width="4" height="4" style="fill:#ced0d6;"/>
<rect x="23" y="24" width="4" height="4" style="fill:#b466b4;"/>
<rect x="18" y="19" width="4" height="4" style="fill:#57965c;"/>
<rect x="23" y="19" width="4" height="4" style="fill:#f2c55c;"/>
<rect x="28" y="19" width="4" height="4" style="fill:#548af7;"/>
<rect x="18" y="24" width="4" height="4" style="fill:#db5c5c;"/>
<g transform="matrix(2,0,0,2,29.8363,17.216)">
</g>
<text x="19.946px" y="17.216px" style="font-family:'ArialMT', 'Arial', sans-serif;font-size:2px;">Dark / New</text>
</g>
<g id="Dark">
<rect x="24.5" y="18" width="5.5" height="5.5" style="fill:#afb1b3;"/>
<rect x="18" y="18" width="5.5" height="5.5" style="fill:#b066b0;"/>
<rect x="18" y="5" width="5.5" height="5.5" style="fill:#499c54;"/>
<rect x="24.5" y="5" width="5.5" height="5.5" style="fill:#f0a732;"/>
<rect x="18" y="11.5" width="5.5" height="5.5" style="fill:#3592c4;"/>
<rect x="24.5" y="11.5" width="5.5" height="5.5" style="fill:#c75450;"/>
<text x="21.889px" y="3.216px" style="font-family:'ArialMT', 'Arial', sans-serif;font-size:2px;">Dark</text>
<g id="Dark---Old" serif:id="Dark / Old">
<rect x="28" y="10" width="4" height="4" style="fill:#afb1b3;"/>
<rect x="23" y="10" width="4" height="4" style="fill:#b066b0;"/>
<rect x="18" y="5" width="4" height="4" style="fill:#499c54;"/>
<rect x="23" y="5" width="4" height="4" style="fill:#f0a732;"/>
<rect x="28" y="5" width="4" height="4" style="fill:#3592c4;"/>
<rect x="18" y="10" width="4" height="4" style="fill:#c75450;"/>
<g transform="matrix(2,0,0,2,29.4477,3.216)">
</g>
<text x="20.446px" y="3.216px" style="font-family:'ArialMT', 'Arial', sans-serif;font-size:2px;">Dark / Old</text>
</g>
<g id="Light---New" serif:id="Light / New">
<rect x="6" y="24" width="4" height="4" style="fill:#b857b8;"/>
<rect x="11" y="24" width="4" height="4" style="fill:#6c707e;"/>
<rect x="1" y="19" width="4" height="4" style="fill:#369650;"/>
<rect x="6" y="19" width="4" height="4" style="fill:#ffaf0f;"/>
<rect x="11" y="19" width="4" height="4" style="fill:#3574f0;"/>
<rect x="1.156" y="24" width="4" height="4" style="fill:#db3b4b;"/>
<g transform="matrix(2,0,0,2,12.9584,17.216)">
</g>
<text x="2.954px" y="17.216px" style="font-family:'ArialMT', 'Arial', sans-serif;font-size:2px;">Light / New</text>
</g>
<g id="Light---Old" serif:id="Light / Old">
<rect x="6" y="10" width="4" height="4" style="fill:#b76db7;"/>
<rect x="10.943" y="10" width="4" height="4" style="fill:#6e6e6e;"/>
<rect x="1" y="5" width="4" height="4" style="fill:#59a869;"/>
<rect x="6" y="5" width="4" height="4" style="fill:#eda200;"/>
<rect x="10.943" y="5" width="4" height="4" style="fill:#389fd6;"/>
<rect x="1" y="10" width="4" height="4" style="fill:#db5860;"/>
<g transform="matrix(2,0,0,2,12.5697,3.216)">
</g>
<text x="3.454px" y="3.216px" style="font-family:'ArialMT', 'Arial', sans-serif;font-size:2px;">Light / Old</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;">
<circle cx="4.5" cy="4" r="2" style="fill:none;stroke:#3574f0;stroke-width:1px;"/>
<path d="M4.5,11.5L8.5,11.5C9.605,11.5 10.5,10.605 10.5,9.5L10.5,8" style="fill:none;fill-rule:nonzero;stroke:#3574f0;stroke-width:1px;"/>
<path d="M4.5,6.5L4.5,14.5" style="fill:none;fill-rule:nonzero;stroke:#3574f0;stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;"/>
<circle cx="10.5" cy="6" r="2" style="fill:none;stroke:#3574f0;stroke-width:1px;"/>
</svg>

After

Width:  |  Height:  |  Size: 793 B

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<path d="M7.5,4.5C7.5,5.605 6.605,6.5 5.5,6.5C4.395,6.5 3.5,5.605 3.5,4.5C3.5,3.395 4.395,2.5 5.5,2.5C6.605,2.5 7.5,3.395 7.5,4.5ZM9,4.5C9,6.176 7.823,7.576 6.25,7.919L6.25,13.25L9.5,13.25C10.209,13.25 10.704,13.25 11.09,13.223C11.471,13.197 11.692,13.149 11.861,13.079C12.412,12.85 12.85,12.412 13.079,11.861C13.149,11.692 13.197,11.471 13.223,11.09C13.244,10.785 13.249,10.412 13.25,9.919C11.677,9.576 10.5,8.175 10.5,6.5C10.5,4.567 12.067,3 14,3C15.933,3 17.5,4.567 17.5,6.5C17.5,8.176 16.323,9.576 14.75,9.92C14.749,10.419 14.744,10.838 14.72,11.193C14.689,11.649 14.623,12.053 14.464,12.435C14.084,13.354 13.354,14.084 12.435,14.464C12.053,14.623 11.649,14.689 11.193,14.72C10.749,14.75 10.203,14.75 9.527,14.75L6.25,14.75L6.25,18C6.25,18.414 5.914,18.75 5.5,18.75C5.086,18.75 4.75,18.414 4.75,18L4.75,7.919C3.177,7.576 2,6.176 2,4.5C2,2.567 3.567,1 5.5,1C7.433,1 9,2.567 9,4.5ZM16,6.5C16,7.605 15.105,8.5 14,8.5C12.895,8.5 12,7.605 12,6.5C12,5.395 12.895,4.5 14,4.5C15.105,4.5 16,5.395 16,6.5Z" style="fill:#3574f0;"/>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<path d="M7.5,4.5C7.5,5.605 6.605,6.5 5.5,6.5C4.395,6.5 3.5,5.605 3.5,4.5C3.5,3.395 4.395,2.5 5.5,2.5C6.605,2.5 7.5,3.395 7.5,4.5ZM9,4.5C9,6.176 7.823,7.576 6.25,7.919L6.25,13.25L9.5,13.25C10.209,13.25 10.704,13.25 11.09,13.223C11.471,13.197 11.692,13.149 11.861,13.079C12.412,12.85 12.85,12.412 13.079,11.861C13.149,11.692 13.197,11.471 13.223,11.09C13.244,10.785 13.249,10.412 13.25,9.919C11.677,9.576 10.5,8.175 10.5,6.5C10.5,4.567 12.067,3 14,3C15.933,3 17.5,4.567 17.5,6.5C17.5,8.176 16.323,9.576 14.75,9.92C14.749,10.419 14.744,10.838 14.72,11.193C14.689,11.649 14.623,12.053 14.464,12.435C14.084,13.354 13.354,14.084 12.435,14.464C12.053,14.623 11.649,14.689 11.193,14.72C10.749,14.75 10.203,14.75 9.527,14.75L6.25,14.75L6.25,18C6.25,18.414 5.914,18.75 5.5,18.75C5.086,18.75 4.75,18.414 4.75,18L4.75,7.919C3.177,7.576 2,6.176 2,4.5C2,2.567 3.567,1 5.5,1C7.433,1 9,2.567 9,4.5ZM16,6.5C16,7.605 15.105,8.5 14,8.5C12.895,8.5 12,7.605 12,6.5C12,5.395 12.895,4.5 14,4.5C15.105,4.5 16,5.395 16,6.5Z" style="fill:#548af7;"/>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;">
<circle cx="4.5" cy="4" r="2" style="fill:none;stroke:#548af7;stroke-width:1px;"/>
<path d="M4.5,11.5L8.5,11.5C9.605,11.5 10.5,10.605 10.5,9.5L10.5,8" style="fill:none;fill-rule:nonzero;stroke:#548af7;stroke-width:1px;"/>
<path d="M4.5,6.5L4.5,14.5" style="fill:none;fill-rule:nonzero;stroke:#548af7;stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;"/>
<circle cx="10.5" cy="6" r="2" style="fill:none;stroke:#548af7;stroke-width:1px;"/>
</svg>

After

Width:  |  Height:  |  Size: 793 B

View File

@@ -1,11 +1,11 @@
package com.chylex.intellij.coloredicons;
import com.chylex.intellij.coloredicons.sets.NewUI;
import com.chylex.intellij.coloredicons.sets.OldUI;
import com.intellij.openapi.util.IconLoader;
import com.intellij.openapi.util.IconPathPatcher;
import com.intellij.ui.NewUiValue;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.Collections;
import java.util.Map;
public class IconPatcher extends IconPathPatcher {
@@ -13,7 +13,7 @@ public class IconPatcher extends IconPathPatcher {
private final Map<String, String> iconPaths;
public IconPatcher() {
iconPaths = NewUiValue.isEnabled() ? Collections.emptyMap() : OldUI.getIconPaths();
iconPaths = NewUiValue.isEnabled() ? NewUI.getIconPaths() : OldUI.getIconPaths();
IconLoader.installPathPatcher(this);
}

View File

@@ -0,0 +1,33 @@
package com.chylex.intellij.coloredicons.sets;
import java.util.HashMap;
import java.util.Map;
public final class NewUI {
public static Map<String, String> getIconPaths() {
return new NewUI().getMap();
}
private final Map<String, String> iconPaths = new HashMap<>();
private NewUI() {
addPathWithDark("toolwindows/toolWindowChanges", "expui/toolwindow/vcs");
addPathWithDark("expui/toolwindow/vcs");
addPathWithDark("expui/toolwindow/vcs@20x20");
}
private Map<String, String> getMap() {
return iconPaths;
}
private void addPathWithDark(final String oldUiPath, final String newPath) {
iconPaths.put('/' + oldUiPath + ".svg", "icons/" + newPath + ".svg");
iconPaths.put('/' + oldUiPath + "_dark.svg", "icons/" + newPath + "_dark.svg");
}
private void addPathWithDark(final String path) {
iconPaths.put('/' + path + ".svg", "icons/" + path + ".svg");
iconPaths.put('/' + path + "_dark.svg", "icons/" + path + "_dark.svg");
}
}