Ignore:
Timestamp:
2020-08-24T21:56:26+02:00 (4 years ago)
Author:
simon04
Message:

fix #19706 - Selection/Relation list: render primitive icons in HiDPI

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/ImageResource.java

    r16486 r16926  
    297297     */
    298298    public ImageIcon getPaddedIcon(Dimension iconSize) {
     299        final ImageIcon imageIcon = getImageIcon(iconSize);
     300        if (imageIcon.getIconWidth() == iconSize.width && imageIcon.getIconHeight() == iconSize.height) {
     301            // fast path for square and svg icons
     302            return imageIcon;
     303        }
     304
    299305        final Dimension cacheKey = new Dimension(-iconSize.width, -iconSize.height); // use negative width/height for differentiation
    300306        BufferedImage image = imgCache.get(cacheKey);
Note: See TracChangeset for help on using the changeset viewer.