Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add button for new ui, implement force default while holding shift, v…
…ersion 2.2
- Loading branch information
1 parent
d9a5c7a
commit cff36dc
Showing
9 changed files
with
63 additions
and
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package icons; | ||
|
||
import com.intellij.ui.IconManager; | ||
|
||
import javax.swing.Icon; | ||
import java.awt.Component; | ||
import java.awt.Graphics; | ||
|
||
public class ResourceIcon implements Icon { | ||
|
||
private final Icon baseIcon; | ||
|
||
public ResourceIcon(String path) { | ||
this.baseIcon = IconManager.getInstance().getIcon(path, ResourceIcon.class); | ||
} | ||
|
||
@Override | ||
public void paintIcon(Component c, Graphics g, int x, int y) { | ||
this.baseIcon.paintIcon(c, g, x, y); | ||
} | ||
|
||
@Override | ||
public int getIconWidth() { | ||
return this.baseIcon.getIconWidth(); | ||
} | ||
|
||
@Override | ||
public int getIconHeight() { | ||
return this.baseIcon.getIconHeight(); | ||
} | ||
} |
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,43 +1,15 @@ | ||
package icons; | ||
|
||
import com.intellij.icons.AllIcons; | ||
import com.intellij.ui.IconManager; | ||
import com.intellij.ui.JBColor; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
import javax.swing.Icon; | ||
import java.awt.Color; | ||
import java.awt.Component; | ||
import java.awt.Graphics; | ||
import java.awt.Graphics2D; | ||
|
||
public class SingleHotSwapIcons { | ||
|
||
public static final @NotNull | ||
Icon SINGLE_HOTSWAP = new Icon() { | ||
private final Icon baseIcon = AllIcons.Actions.Compile; | ||
@NotNull | ||
public static final Icon SINGLE_HOTSWAP = new ResourceIcon("/icons/singlehotswap.svg"); | ||
|
||
@Override | ||
public void paintIcon(Component c, Graphics g, int x, int y) { | ||
IconManager.getInstance() | ||
.colorize( | ||
(Graphics2D) g, | ||
this.baseIcon, | ||
new JBColor( | ||
new Color(0x3388FF), | ||
new Color(0x3388FF) | ||
) | ||
).paintIcon(c, g, x, y); | ||
} | ||
@NotNull | ||
public static final Icon SINGLE_HOTSWAP_REDESIGN = new ResourceIcon("/icons/singlehotswap_redesign.svg"); | ||
|
||
@Override | ||
public int getIconWidth() { | ||
return this.baseIcon.getIconWidth(); | ||
} | ||
|
||
@Override | ||
public int getIconHeight() { | ||
return this.baseIcon.getIconHeight(); | ||
} | ||
}; | ||
} |
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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.