Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[FIXED JENKINS-33799]
Fix the width & height of the icon via CSS.

Previously, we were relying on the actual image being served as a
correct size. This is fine for icons we ship in Jenkins, but when
plugins use avatars as icons, those images might not come in the correct
size.
  • Loading branch information
kohsuke committed Mar 25, 2016
1 parent 1873c6f commit 25ad5ae
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/resources/lib/hudson/ballColorTd.jelly
Expand Up @@ -71,7 +71,7 @@ THE SOFTWARE.
<j:otherwise>
<!-- We don't seem to have this icon in the IconSet... fallback again... -->
<j:set var="iconUrl" value="${it.getImageOf(iconSize)}"/>
<l:icon src="${iconUrl}" alt="${it.description}" tooltip="${it.description}" style="${attrs.style}" />
<l:icon src="${iconUrl}" class="${iconSizeClass}" alt="${it.description}" tooltip="${it.description}" style="${attrs.style}" />
</j:otherwise>
</j:choose>
</j:otherwise>
Expand Down
20 changes: 20 additions & 0 deletions war/src/main/webapp/css/style.css
Expand Up @@ -1975,3 +1975,23 @@ body.main-panel-only #main-panel {
padding: 2em 10%;
}
}

IMG.icon-sm {
width: 16px;
height: 16px;
}

IMG.icon-md {
width: 24px;
height: 24px;
}

IMG.icon-lg {
width: 32px;
height: 32px;
}

IMG.icon-xl {
width: 48px;
height: 48px;
}

1 comment on commit 25ad5ae

@recena
Copy link
Contributor

@recena recena commented on 25ad5ae Apr 11, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kohsuke It seems you added the same several years ago.

Please sign in to comment.