Animated icon for commits loading fixed; retina double sized icons added

This commit is contained in:
Nadya Zabrodina
2014-08-13 17:14:33 +04:00
parent 0ffd842779
commit d818178e7b
6 changed files with 8 additions and 5 deletions
+1
View File
@@ -5,6 +5,7 @@
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/testFramework" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/resources" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

@@ -18,17 +18,18 @@ package com.intellij.dvcs.push.ui;
import com.intellij.ui.ColoredTreeCellRenderer;
import com.intellij.ui.JBColor;
import com.intellij.ui.SimpleTextAttributes;
import com.intellij.util.ui.UIUtil;
import com.intellij.util.ImageLoader;
import com.intellij.util.ui.JBImageIcon;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import javax.swing.tree.DefaultMutableTreeNode;
import java.awt.*;
import java.net.URL;
public class LoadingTreeNode extends DefaultMutableTreeNode implements CustomRenderedTreeNode {
@NotNull protected ImageIcon myLoadingIcon;
private static final String LOADING_ICON = "loadingSimpleIcon.gif";
private static final String LOADING_DARK_ICON = "loadingSimpleDarkIcon.gif";
private static final String LOADING_ICON = "/icons/loading.gif";
@NotNull
public ImageIcon getIcon() {
@@ -37,8 +38,9 @@ public class LoadingTreeNode extends DefaultMutableTreeNode implements CustomRen
public LoadingTreeNode() {
super(null, false);
URL loadingIconPath = getClass().getResource(UIUtil.isUnderDarcula() ? LOADING_DARK_ICON : LOADING_ICON);
myLoadingIcon = new ImageIcon(loadingIconPath.getPath());
URL loadingIconUrl = getClass().getResource(LOADING_ICON);
Image image = ImageLoader.loadFromUrl(loadingIconUrl);
myLoadingIcon = new JBImageIcon(image);
}
@Override