Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to SVGs for most icons #393

Merged
merged 10 commits into from
Apr 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
<hpi.compatibleSinceVersion>2.2.0</hpi.compatibleSinceVersion>
<java.level>8</java.level>
<jenkins.version>2.277.1</jenkins.version>
<jenkins.version>2.283</jenkins.version>
<useBeta>true</useBeta>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
import net.jcip.annotations.GuardedBy;
import org.apache.commons.lang.StringUtils;
import org.jenkins.ui.icon.Icon;
import org.jenkins.ui.icon.IconFormat;
import org.jenkins.ui.icon.IconSet;
import org.jenkins.ui.icon.IconSpec;
import org.jenkinsci.Symbol;
Expand Down Expand Up @@ -1776,65 +1777,77 @@ public List<SCMTrait<? extends SCMTrait<?>>> getTraitsDefaults() {
IconSet.icons.addIcon(
new Icon(
"icon-github-logo icon-sm",
"plugin/github-branch-source/images/16x16/github-logo.png",
Icon.ICON_SMALL_STYLE));
"plugin/github-branch-source/images/svgs/sprite-github.svg#github-logo",
Icon.ICON_SMALL_STYLE,
IconFormat.EXTERNAL_SVG_SPRITE));
IconSet.icons.addIcon(
new Icon(
"icon-github-logo icon-md",
"plugin/github-branch-source/images/24x24/github-logo.png",
Icon.ICON_MEDIUM_STYLE));
"plugin/github-branch-source/images/svgs/sprite-github.svg#github-logo",
Icon.ICON_MEDIUM_STYLE,
IconFormat.EXTERNAL_SVG_SPRITE));
IconSet.icons.addIcon(
new Icon(
"icon-github-logo icon-lg",
"plugin/github-branch-source/images/32x32/github-logo.png",
Icon.ICON_LARGE_STYLE));
"plugin/github-branch-source/images/svgs/sprite-github.svg#github-logo",
Icon.ICON_LARGE_STYLE,
IconFormat.EXTERNAL_SVG_SPRITE));
IconSet.icons.addIcon(
new Icon(
"icon-github-logo icon-xlg",
"plugin/github-branch-source/images/48x48/github-logo.png",
Icon.ICON_XLARGE_STYLE));
"plugin/github-branch-source/images/svgs/sprite-github.svg#github-logo",
Icon.ICON_XLARGE_STYLE,
IconFormat.EXTERNAL_SVG_SPRITE));

IconSet.icons.addIcon(
new Icon(
"icon-github-repo icon-sm",
"plugin/github-branch-source/images/16x16/github-repo.png",
Icon.ICON_SMALL_STYLE));
"plugin/github-branch-source/images/svgs/sprite-github.svg#github-repo",
Icon.ICON_SMALL_STYLE,
IconFormat.EXTERNAL_SVG_SPRITE));
IconSet.icons.addIcon(
new Icon(
"icon-github-repo icon-md",
"plugin/github-branch-source/images/24x24/github-repo.png",
Icon.ICON_MEDIUM_STYLE));
"plugin/github-branch-source/images/svgs/sprite-github.svg#github-repo",
Icon.ICON_MEDIUM_STYLE,
IconFormat.EXTERNAL_SVG_SPRITE));
IconSet.icons.addIcon(
new Icon(
"icon-github-repo icon-lg",
"plugin/github-branch-source/images/32x32/github-repo.png",
Icon.ICON_LARGE_STYLE));
"plugin/github-branch-source/images/svgs/sprite-github.svg#github-repo",
Icon.ICON_LARGE_STYLE,
IconFormat.EXTERNAL_SVG_SPRITE));
IconSet.icons.addIcon(
new Icon(
"icon-github-repo icon-xlg",
"plugin/github-branch-source/images/48x48/github-repo.png",
Icon.ICON_XLARGE_STYLE));
"github-branch-source/images/svgs/sprite-github.svg#github-repo",
Icon.ICON_XLARGE_STYLE,
IconFormat.EXTERNAL_SVG_SPRITE));

IconSet.icons.addIcon(
new Icon(
"icon-github-branch icon-sm",
"plugin/github-branch-source/images/16x16/github-branch.png",
Icon.ICON_SMALL_STYLE));
"plugin/github-branch-source/images/svgs/sprite-github.svg#git-branch",
Icon.ICON_SMALL_STYLE,
IconFormat.EXTERNAL_SVG_SPRITE));
IconSet.icons.addIcon(
new Icon(
"icon-github-branch icon-md",
"plugin/github-branch-source/images/24x24/github-branch.png",
Icon.ICON_MEDIUM_STYLE));
"plugin/github-branch-source/images/svgs/sprite-github.svg#git-branch",
Icon.ICON_MEDIUM_STYLE,
IconFormat.EXTERNAL_SVG_SPRITE));
IconSet.icons.addIcon(
new Icon(
"icon-github-branch icon-lg",
"plugin/github-branch-source/images/32x32/github-branch.png",
Icon.ICON_LARGE_STYLE));
"plugin/github-branch-source/images/svgs/sprite-github.svg#git-branch",
Icon.ICON_LARGE_STYLE,
IconFormat.EXTERNAL_SVG_SPRITE));
IconSet.icons.addIcon(
new Icon(
"icon-github-branch icon-xlg",
"plugin/github-branch-source/images/48x48/github-branch.png",
Icon.ICON_XLARGE_STYLE));
"plugin/github-branch-source/images/svgs/sprite-github.svg#git-branch",
Icon.ICON_XLARGE_STYLE,
IconFormat.EXTERNAL_SVG_SPRITE));
}
}

Expand Down
Binary file removed src/main/webapp/images/16x16/github-branch.png
Binary file not shown.
Binary file removed src/main/webapp/images/16x16/github-repo.png
Binary file not shown.
Binary file removed src/main/webapp/images/24x24/github-branch.png
Binary file not shown.
Binary file removed src/main/webapp/images/24x24/github-repo.png
Binary file not shown.
Binary file removed src/main/webapp/images/32x32/github-branch.png
Binary file not shown.
Binary file removed src/main/webapp/images/32x32/github-repo.png
Binary file not shown.
Binary file removed src/main/webapp/images/48x48/github-branch.png
Binary file not shown.
Binary file removed src/main/webapp/images/48x48/github-repo.png
Binary file not shown.
12 changes: 12 additions & 0 deletions src/main/webapp/images/svgs/sprite-github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.